阶段性提交

This commit is contained in:
GoEdgeLab
2020-07-30 22:41:35 +08:00
parent 16d2dff57a
commit e6266b7dc3
28 changed files with 1879 additions and 153 deletions

View File

@@ -33,6 +33,7 @@ type Node struct {
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
Cluster *NodeCluster `protobuf:"bytes,32,opt,name=cluster,proto3" json:"cluster,omitempty"`
Login *NodeLogin `protobuf:"bytes,33,opt,name=login,proto3" json:"login,omitempty"`
}
func (x *Node) Reset() {
@@ -88,19 +89,30 @@ func (x *Node) GetCluster() *NodeCluster {
return nil
}
func (x *Node) GetLogin() *NodeLogin {
if x != nil {
return x.Login
}
return nil
}
var File_model_node_proto protoreflect.FileDescriptor
var file_model_node_proto_rawDesc = []byte{
0x0a, 0x10, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x1a, 0x18, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x6e, 0x6f,
0x64, 0x65, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x22, 0x55, 0x0a, 0x04, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01,
0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65,
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x29, 0x0a, 0x07,
0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x20, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e,
0x70, 0x62, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x07,
0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62,
0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x1a, 0x16, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x6c, 0x6f, 0x67,
0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x7a, 0x0a, 0x04, 0x4e, 0x6f, 0x64, 0x65,
0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64,
0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04,
0x6e, 0x61, 0x6d, 0x65, 0x12, 0x29, 0x0a, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18,
0x20, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x70, 0x62, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x43,
0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12,
0x23, 0x0a, 0x05, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x18, 0x21, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d,
0x2e, 0x70, 0x62, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x05, 0x6c,
0x6f, 0x67, 0x69, 0x6e, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x33,
}
var (
@@ -119,14 +131,16 @@ var file_model_node_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_model_node_proto_goTypes = []interface{}{
(*Node)(nil), // 0: pb.Node
(*NodeCluster)(nil), // 1: pb.NodeCluster
(*NodeLogin)(nil), // 2: pb.NodeLogin
}
var file_model_node_proto_depIdxs = []int32{
1, // 0: pb.Node.cluster:type_name -> pb.NodeCluster
1, // [1:1] is the sub-list for method output_type
1, // [1:1] is the sub-list for method input_type
1, // [1:1] is the sub-list for extension type_name
1, // [1:1] is the sub-list for extension extendee
0, // [0:1] is the sub-list for field type_name
2, // 1: pb.Node.login:type_name -> pb.NodeLogin
2, // [2:2] is the sub-list for method output_type
2, // [2:2] is the sub-list for method input_type
2, // [2:2] is the sub-list for extension type_name
2, // [2:2] is the sub-list for extension extendee
0, // [0:2] is the sub-list for field type_name
}
func init() { file_model_node_proto_init() }
@@ -135,6 +149,7 @@ func file_model_node_proto_init() {
return
}
file_model_node_cluster_proto_init()
file_model_node_login_proto_init()
if !protoimpl.UnsafeEnabled {
file_model_node_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Node); i {

View File

@@ -0,0 +1,174 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0
// protoc v3.12.3
// source: model_node_login.proto
package pb
import (
proto "github.com/golang/protobuf/proto"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// This is a compile-time assertion that a sufficiently up-to-date version
// of the legacy proto package is being used.
const _ = proto.ProtoPackageIsVersion4
type NodeLogin struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
Type string `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"`
Params []byte `protobuf:"bytes,4,opt,name=params,proto3" json:"params,omitempty"`
}
func (x *NodeLogin) Reset() {
*x = NodeLogin{}
if protoimpl.UnsafeEnabled {
mi := &file_model_node_login_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *NodeLogin) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*NodeLogin) ProtoMessage() {}
func (x *NodeLogin) ProtoReflect() protoreflect.Message {
mi := &file_model_node_login_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use NodeLogin.ProtoReflect.Descriptor instead.
func (*NodeLogin) Descriptor() ([]byte, []int) {
return file_model_node_login_proto_rawDescGZIP(), []int{0}
}
func (x *NodeLogin) GetId() int64 {
if x != nil {
return x.Id
}
return 0
}
func (x *NodeLogin) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *NodeLogin) GetType() string {
if x != nil {
return x.Type
}
return ""
}
func (x *NodeLogin) GetParams() []byte {
if x != nil {
return x.Params
}
return nil
}
var File_model_node_login_proto protoreflect.FileDescriptor
var file_model_node_login_proto_rawDesc = []byte{
0x0a, 0x16, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x6c, 0x6f, 0x67,
0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x22, 0x5b, 0x0a, 0x09,
0x4e, 0x6f, 0x64, 0x65, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18,
0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d,
0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a,
0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70,
0x65, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28,
0x0c, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70,
0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_model_node_login_proto_rawDescOnce sync.Once
file_model_node_login_proto_rawDescData = file_model_node_login_proto_rawDesc
)
func file_model_node_login_proto_rawDescGZIP() []byte {
file_model_node_login_proto_rawDescOnce.Do(func() {
file_model_node_login_proto_rawDescData = protoimpl.X.CompressGZIP(file_model_node_login_proto_rawDescData)
})
return file_model_node_login_proto_rawDescData
}
var file_model_node_login_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_model_node_login_proto_goTypes = []interface{}{
(*NodeLogin)(nil), // 0: pb.NodeLogin
}
var file_model_node_login_proto_depIdxs = []int32{
0, // [0:0] is the sub-list for method output_type
0, // [0:0] is the sub-list for method input_type
0, // [0:0] is the sub-list for extension type_name
0, // [0:0] is the sub-list for extension extendee
0, // [0:0] is the sub-list for field type_name
}
func init() { file_model_node_login_proto_init() }
func file_model_node_login_proto_init() {
if File_model_node_login_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_model_node_login_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*NodeLogin); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_model_node_login_proto_rawDesc,
NumEnums: 0,
NumMessages: 1,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_model_node_login_proto_goTypes,
DependencyIndexes: file_model_node_login_proto_depIdxs,
MessageInfos: file_model_node_login_proto_msgTypes,
}.Build()
File_model_node_login_proto = out.File
file_model_node_login_proto_rawDesc = nil
file_model_node_login_proto_goTypes = nil
file_model_node_login_proto_depIdxs = nil
}

View File

@@ -35,8 +35,9 @@ type CreateNodeRequest struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
ClusterId int64 `protobuf:"varint,2,opt,name=clusterId,proto3" json:"clusterId,omitempty"`
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
ClusterId int64 `protobuf:"varint,2,opt,name=clusterId,proto3" json:"clusterId,omitempty"`
Login *NodeLogin `protobuf:"bytes,3,opt,name=Login,proto3" json:"Login,omitempty"`
}
func (x *CreateNodeRequest) Reset() {
@@ -85,6 +86,13 @@ func (x *CreateNodeRequest) GetClusterId() int64 {
return 0
}
func (x *CreateNodeRequest) GetLogin() *NodeLogin {
if x != nil {
return x.Login
}
return nil
}
type CreateNodeResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@@ -321,49 +329,377 @@ func (x *ListEnabledNodesResponse) GetNodes() []*Node {
return nil
}
// 禁用节点
type DisableNodeRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
NodeId int64 `protobuf:"varint,1,opt,name=nodeId,proto3" json:"nodeId,omitempty"`
}
func (x *DisableNodeRequest) Reset() {
*x = DisableNodeRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_service_node_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *DisableNodeRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DisableNodeRequest) ProtoMessage() {}
func (x *DisableNodeRequest) ProtoReflect() protoreflect.Message {
mi := &file_service_node_proto_msgTypes[6]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use DisableNodeRequest.ProtoReflect.Descriptor instead.
func (*DisableNodeRequest) Descriptor() ([]byte, []int) {
return file_service_node_proto_rawDescGZIP(), []int{6}
}
func (x *DisableNodeRequest) GetNodeId() int64 {
if x != nil {
return x.NodeId
}
return 0
}
type DisableNodeResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *DisableNodeResponse) Reset() {
*x = DisableNodeResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_service_node_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *DisableNodeResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DisableNodeResponse) ProtoMessage() {}
func (x *DisableNodeResponse) ProtoReflect() protoreflect.Message {
mi := &file_service_node_proto_msgTypes[7]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use DisableNodeResponse.ProtoReflect.Descriptor instead.
func (*DisableNodeResponse) Descriptor() ([]byte, []int) {
return file_service_node_proto_rawDescGZIP(), []int{7}
}
// 修改节点
type UpdateNodeRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
NodeId int64 `protobuf:"varint,1,opt,name=nodeId,proto3" json:"nodeId,omitempty"`
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
ClusterId int64 `protobuf:"varint,3,opt,name=clusterId,proto3" json:"clusterId,omitempty"`
Login *NodeLogin `protobuf:"bytes,4,opt,name=Login,proto3" json:"Login,omitempty"`
}
func (x *UpdateNodeRequest) Reset() {
*x = UpdateNodeRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_service_node_proto_msgTypes[8]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *UpdateNodeRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*UpdateNodeRequest) ProtoMessage() {}
func (x *UpdateNodeRequest) ProtoReflect() protoreflect.Message {
mi := &file_service_node_proto_msgTypes[8]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use UpdateNodeRequest.ProtoReflect.Descriptor instead.
func (*UpdateNodeRequest) Descriptor() ([]byte, []int) {
return file_service_node_proto_rawDescGZIP(), []int{8}
}
func (x *UpdateNodeRequest) GetNodeId() int64 {
if x != nil {
return x.NodeId
}
return 0
}
func (x *UpdateNodeRequest) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *UpdateNodeRequest) GetClusterId() int64 {
if x != nil {
return x.ClusterId
}
return 0
}
func (x *UpdateNodeRequest) GetLogin() *NodeLogin {
if x != nil {
return x.Login
}
return nil
}
type UpdateNodeResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *UpdateNodeResponse) Reset() {
*x = UpdateNodeResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_service_node_proto_msgTypes[9]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *UpdateNodeResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*UpdateNodeResponse) ProtoMessage() {}
func (x *UpdateNodeResponse) ProtoReflect() protoreflect.Message {
mi := &file_service_node_proto_msgTypes[9]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use UpdateNodeResponse.ProtoReflect.Descriptor instead.
func (*UpdateNodeResponse) Descriptor() ([]byte, []int) {
return file_service_node_proto_rawDescGZIP(), []int{9}
}
// 查找节点
type FindEnabledNodeRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
NodeId int64 `protobuf:"varint,1,opt,name=nodeId,proto3" json:"nodeId,omitempty"`
}
func (x *FindEnabledNodeRequest) Reset() {
*x = FindEnabledNodeRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_service_node_proto_msgTypes[10]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *FindEnabledNodeRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*FindEnabledNodeRequest) ProtoMessage() {}
func (x *FindEnabledNodeRequest) ProtoReflect() protoreflect.Message {
mi := &file_service_node_proto_msgTypes[10]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use FindEnabledNodeRequest.ProtoReflect.Descriptor instead.
func (*FindEnabledNodeRequest) Descriptor() ([]byte, []int) {
return file_service_node_proto_rawDescGZIP(), []int{10}
}
func (x *FindEnabledNodeRequest) GetNodeId() int64 {
if x != nil {
return x.NodeId
}
return 0
}
type FindEnabledNodeResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Node *Node `protobuf:"bytes,1,opt,name=node,proto3" json:"node,omitempty"`
}
func (x *FindEnabledNodeResponse) Reset() {
*x = FindEnabledNodeResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_service_node_proto_msgTypes[11]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *FindEnabledNodeResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*FindEnabledNodeResponse) ProtoMessage() {}
func (x *FindEnabledNodeResponse) ProtoReflect() protoreflect.Message {
mi := &file_service_node_proto_msgTypes[11]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use FindEnabledNodeResponse.ProtoReflect.Descriptor instead.
func (*FindEnabledNodeResponse) Descriptor() ([]byte, []int) {
return file_service_node_proto_rawDescGZIP(), []int{11}
}
func (x *FindEnabledNodeResponse) GetNode() *Node {
if x != nil {
return x.Node
}
return nil
}
var File_service_node_proto protoreflect.FileDescriptor
var file_service_node_proto_rawDesc = []byte{
0x0a, 0x12, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x1a, 0x10, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f,
0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x45, 0x0a, 0x11, 0x43, 0x72,
0x65, 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e,
0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64,
0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49,
0x64, 0x22, 0x2c, 0x0a, 0x12, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52,
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49,
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x22,
0x1d, 0x0a, 0x1b, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c,
0x65, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x34,
0x0a, 0x1c, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65,
0x64, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14,
0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x63,
0x6f, 0x75, 0x6e, 0x74, 0x22, 0x45, 0x0a, 0x17, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x61, 0x62,
0x6c, 0x65, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
0x16, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52,
0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18,
0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x22, 0x3a, 0x0a, 0x18, 0x4c,
0x69, 0x73, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x52,
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1e, 0x0a, 0x05, 0x6e, 0x6f, 0x64, 0x65, 0x73,
0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x4e, 0x6f, 0x64, 0x65,
0x52, 0x05, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x32, 0xf4, 0x01, 0x0a, 0x0b, 0x4e, 0x6f, 0x64, 0x65,
0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x3b, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74,
0x65, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x15, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74,
0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x70,
0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x12, 0x59, 0x0a, 0x14, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x6c, 0x6c,
0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x1f, 0x2e, 0x70,
0x62, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65,
0x64, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e,
0x70, 0x62, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c,
0x65, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
0x4d, 0x0a, 0x10, 0x6c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x6f,
0x64, 0x65, 0x73, 0x12, 0x1b, 0x2e, 0x70, 0x62, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x61,
0x62, 0x6c, 0x65, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x1a, 0x1c, 0x2e, 0x70, 0x62, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65,
0x64, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x06,
0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x16, 0x6d, 0x6f, 0x64, 0x65,
0x6c, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x22, 0x6a, 0x0a, 0x11, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18,
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x63,
0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09,
0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x12, 0x23, 0x0a, 0x05, 0x4c, 0x6f, 0x67,
0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x70, 0x62, 0x2e, 0x4e, 0x6f,
0x64, 0x65, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x05, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x22, 0x2c,
0x0a, 0x12, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x18, 0x01,
0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x22, 0x1d, 0x0a, 0x1b,
0x43, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e,
0x6f, 0x64, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x34, 0x0a, 0x1c, 0x43,
0x6f, 0x75, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x6f,
0x64, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63,
0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e,
0x74, 0x22, 0x45, 0x0a, 0x17, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64,
0x4e, 0x6f, 0x64, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06,
0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x6f, 0x66,
0x66, 0x73, 0x65, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01,
0x28, 0x03, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x22, 0x3a, 0x0a, 0x18, 0x4c, 0x69, 0x73, 0x74,
0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1e, 0x0a, 0x05, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x01, 0x20,
0x03, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x05, 0x6e,
0x6f, 0x64, 0x65, 0x73, 0x22, 0x2c, 0x0a, 0x12, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x4e,
0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x6f,
0x64, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x6e, 0x6f, 0x64, 0x65,
0x49, 0x64, 0x22, 0x15, 0x0a, 0x13, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x4e, 0x6f, 0x64,
0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x82, 0x01, 0x0a, 0x11, 0x55, 0x70,
0x64, 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
0x16, 0x0a, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52,
0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18,
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x63,
0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09,
0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x12, 0x23, 0x0a, 0x05, 0x4c, 0x6f, 0x67,
0x69, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x70, 0x62, 0x2e, 0x4e, 0x6f,
0x64, 0x65, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x05, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x22, 0x14,
0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x22, 0x30, 0x0a, 0x16, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62,
0x6c, 0x65, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16,
0x0a, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06,
0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x22, 0x37, 0x0a, 0x17, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e,
0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
0x65, 0x12, 0x1c, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x08, 0x2e, 0x70, 0x62, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x32,
0xbd, 0x03, 0x0a, 0x0b, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12,
0x3b, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x15, 0x2e,
0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65,
0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x59, 0x0a, 0x14,
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e,
0x6f, 0x64, 0x65, 0x73, 0x12, 0x1f, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x41,
0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74,
0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x52,
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4d, 0x0a, 0x10, 0x6c, 0x69, 0x73, 0x74, 0x45,
0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x1b, 0x2e, 0x70, 0x62,
0x2e, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x6f, 0x64, 0x65,
0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x70, 0x62, 0x2e, 0x4c, 0x69,
0x73, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x52, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3e, 0x0a, 0x0b, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c,
0x65, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x69, 0x73, 0x61, 0x62,
0x6c, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e,
0x70, 0x62, 0x2e, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65,
0x4e, 0x6f, 0x64, 0x65, 0x12, 0x15, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65,
0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x70, 0x62,
0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f,
0x6e, 0x73, 0x65, 0x12, 0x4a, 0x0a, 0x0f, 0x66, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c,
0x65, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x1a, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64,
0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62,
0x6c, 0x65, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42,
0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
@@ -378,7 +714,7 @@ func file_service_node_proto_rawDescGZIP() []byte {
return file_service_node_proto_rawDescData
}
var file_service_node_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
var file_service_node_proto_msgTypes = make([]protoimpl.MessageInfo, 12)
var file_service_node_proto_goTypes = []interface{}{
(*CreateNodeRequest)(nil), // 0: pb.CreateNodeRequest
(*CreateNodeResponse)(nil), // 1: pb.CreateNodeResponse
@@ -386,21 +722,37 @@ var file_service_node_proto_goTypes = []interface{}{
(*CountAllEnabledNodesResponse)(nil), // 3: pb.CountAllEnabledNodesResponse
(*ListEnabledNodesRequest)(nil), // 4: pb.ListEnabledNodesRequest
(*ListEnabledNodesResponse)(nil), // 5: pb.ListEnabledNodesResponse
(*Node)(nil), // 6: pb.Node
(*DisableNodeRequest)(nil), // 6: pb.DisableNodeRequest
(*DisableNodeResponse)(nil), // 7: pb.DisableNodeResponse
(*UpdateNodeRequest)(nil), // 8: pb.UpdateNodeRequest
(*UpdateNodeResponse)(nil), // 9: pb.UpdateNodeResponse
(*FindEnabledNodeRequest)(nil), // 10: pb.FindEnabledNodeRequest
(*FindEnabledNodeResponse)(nil), // 11: pb.FindEnabledNodeResponse
(*NodeLogin)(nil), // 12: pb.NodeLogin
(*Node)(nil), // 13: pb.Node
}
var file_service_node_proto_depIdxs = []int32{
6, // 0: pb.ListEnabledNodesResponse.nodes:type_name -> pb.Node
0, // 1: pb.NodeService.createNode:input_type -> pb.CreateNodeRequest
2, // 2: pb.NodeService.countAllEnabledNodes:input_type -> pb.CountAllEnabledNodesRequest
4, // 3: pb.NodeService.listEnabledNodes:input_type -> pb.ListEnabledNodesRequest
1, // 4: pb.NodeService.createNode:output_type -> pb.CreateNodeResponse
3, // 5: pb.NodeService.countAllEnabledNodes:output_type -> pb.CountAllEnabledNodesResponse
5, // 6: pb.NodeService.listEnabledNodes:output_type -> pb.ListEnabledNodesResponse
4, // [4:7] is the sub-list for method output_type
1, // [1:4] is the sub-list for method input_type
1, // [1:1] is the sub-list for extension type_name
1, // [1:1] is the sub-list for extension extendee
0, // [0:1] is the sub-list for field type_name
12, // 0: pb.CreateNodeRequest.Login:type_name -> pb.NodeLogin
13, // 1: pb.ListEnabledNodesResponse.nodes:type_name -> pb.Node
12, // 2: pb.UpdateNodeRequest.Login:type_name -> pb.NodeLogin
13, // 3: pb.FindEnabledNodeResponse.node:type_name -> pb.Node
0, // 4: pb.NodeService.createNode:input_type -> pb.CreateNodeRequest
2, // 5: pb.NodeService.countAllEnabledNodes:input_type -> pb.CountAllEnabledNodesRequest
4, // 6: pb.NodeService.listEnabledNodes:input_type -> pb.ListEnabledNodesRequest
6, // 7: pb.NodeService.disableNode:input_type -> pb.DisableNodeRequest
8, // 8: pb.NodeService.updateNode:input_type -> pb.UpdateNodeRequest
10, // 9: pb.NodeService.findEnabledNode:input_type -> pb.FindEnabledNodeRequest
1, // 10: pb.NodeService.createNode:output_type -> pb.CreateNodeResponse
3, // 11: pb.NodeService.countAllEnabledNodes:output_type -> pb.CountAllEnabledNodesResponse
5, // 12: pb.NodeService.listEnabledNodes:output_type -> pb.ListEnabledNodesResponse
7, // 13: pb.NodeService.disableNode:output_type -> pb.DisableNodeResponse
9, // 14: pb.NodeService.updateNode:output_type -> pb.UpdateNodeResponse
11, // 15: pb.NodeService.findEnabledNode:output_type -> pb.FindEnabledNodeResponse
10, // [10:16] is the sub-list for method output_type
4, // [4:10] is the sub-list for method input_type
4, // [4:4] is the sub-list for extension type_name
4, // [4:4] is the sub-list for extension extendee
0, // [0:4] is the sub-list for field type_name
}
func init() { file_service_node_proto_init() }
@@ -409,6 +761,7 @@ func file_service_node_proto_init() {
return
}
file_model_node_proto_init()
file_model_node_login_proto_init()
if !protoimpl.UnsafeEnabled {
file_service_node_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CreateNodeRequest); i {
@@ -482,6 +835,78 @@ func file_service_node_proto_init() {
return nil
}
}
file_service_node_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DisableNodeRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_service_node_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DisableNodeResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_service_node_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*UpdateNodeRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_service_node_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*UpdateNodeResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_service_node_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*FindEnabledNodeRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_service_node_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*FindEnabledNodeResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
@@ -489,7 +914,7 @@ func file_service_node_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_service_node_proto_rawDesc,
NumEnums: 0,
NumMessages: 6,
NumMessages: 12,
NumExtensions: 0,
NumServices: 1,
},
@@ -521,6 +946,12 @@ type NodeServiceClient interface {
CountAllEnabledNodes(ctx context.Context, in *CountAllEnabledNodesRequest, opts ...grpc.CallOption) (*CountAllEnabledNodesResponse, error)
// 列出单页节点
ListEnabledNodes(ctx context.Context, in *ListEnabledNodesRequest, opts ...grpc.CallOption) (*ListEnabledNodesResponse, error)
// 禁用节点
DisableNode(ctx context.Context, in *DisableNodeRequest, opts ...grpc.CallOption) (*DisableNodeResponse, error)
// 修改节点
UpdateNode(ctx context.Context, in *UpdateNodeRequest, opts ...grpc.CallOption) (*UpdateNodeResponse, error)
// 查看单个节点
FindEnabledNode(ctx context.Context, in *FindEnabledNodeRequest, opts ...grpc.CallOption) (*FindEnabledNodeResponse, error)
}
type nodeServiceClient struct {
@@ -558,6 +989,33 @@ func (c *nodeServiceClient) ListEnabledNodes(ctx context.Context, in *ListEnable
return out, nil
}
func (c *nodeServiceClient) DisableNode(ctx context.Context, in *DisableNodeRequest, opts ...grpc.CallOption) (*DisableNodeResponse, error) {
out := new(DisableNodeResponse)
err := c.cc.Invoke(ctx, "/pb.NodeService/disableNode", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *nodeServiceClient) UpdateNode(ctx context.Context, in *UpdateNodeRequest, opts ...grpc.CallOption) (*UpdateNodeResponse, error) {
out := new(UpdateNodeResponse)
err := c.cc.Invoke(ctx, "/pb.NodeService/updateNode", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *nodeServiceClient) FindEnabledNode(ctx context.Context, in *FindEnabledNodeRequest, opts ...grpc.CallOption) (*FindEnabledNodeResponse, error) {
out := new(FindEnabledNodeResponse)
err := c.cc.Invoke(ctx, "/pb.NodeService/findEnabledNode", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// NodeServiceServer is the server API for NodeService service.
type NodeServiceServer interface {
// 创建节点
@@ -566,6 +1024,12 @@ type NodeServiceServer interface {
CountAllEnabledNodes(context.Context, *CountAllEnabledNodesRequest) (*CountAllEnabledNodesResponse, error)
// 列出单页节点
ListEnabledNodes(context.Context, *ListEnabledNodesRequest) (*ListEnabledNodesResponse, error)
// 禁用节点
DisableNode(context.Context, *DisableNodeRequest) (*DisableNodeResponse, error)
// 修改节点
UpdateNode(context.Context, *UpdateNodeRequest) (*UpdateNodeResponse, error)
// 查看单个节点
FindEnabledNode(context.Context, *FindEnabledNodeRequest) (*FindEnabledNodeResponse, error)
}
// UnimplementedNodeServiceServer can be embedded to have forward compatible implementations.
@@ -581,6 +1045,15 @@ func (*UnimplementedNodeServiceServer) CountAllEnabledNodes(context.Context, *Co
func (*UnimplementedNodeServiceServer) ListEnabledNodes(context.Context, *ListEnabledNodesRequest) (*ListEnabledNodesResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListEnabledNodes not implemented")
}
func (*UnimplementedNodeServiceServer) DisableNode(context.Context, *DisableNodeRequest) (*DisableNodeResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method DisableNode not implemented")
}
func (*UnimplementedNodeServiceServer) UpdateNode(context.Context, *UpdateNodeRequest) (*UpdateNodeResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method UpdateNode not implemented")
}
func (*UnimplementedNodeServiceServer) FindEnabledNode(context.Context, *FindEnabledNodeRequest) (*FindEnabledNodeResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method FindEnabledNode not implemented")
}
func RegisterNodeServiceServer(s *grpc.Server, srv NodeServiceServer) {
s.RegisterService(&_NodeService_serviceDesc, srv)
@@ -640,6 +1113,60 @@ func _NodeService_ListEnabledNodes_Handler(srv interface{}, ctx context.Context,
return interceptor(ctx, in, info, handler)
}
func _NodeService_DisableNode_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DisableNodeRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(NodeServiceServer).DisableNode(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/pb.NodeService/DisableNode",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(NodeServiceServer).DisableNode(ctx, req.(*DisableNodeRequest))
}
return interceptor(ctx, in, info, handler)
}
func _NodeService_UpdateNode_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(UpdateNodeRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(NodeServiceServer).UpdateNode(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/pb.NodeService/UpdateNode",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(NodeServiceServer).UpdateNode(ctx, req.(*UpdateNodeRequest))
}
return interceptor(ctx, in, info, handler)
}
func _NodeService_FindEnabledNode_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(FindEnabledNodeRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(NodeServiceServer).FindEnabledNode(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/pb.NodeService/FindEnabledNode",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(NodeServiceServer).FindEnabledNode(ctx, req.(*FindEnabledNodeRequest))
}
return interceptor(ctx, in, info, handler)
}
var _NodeService_serviceDesc = grpc.ServiceDesc{
ServiceName: "pb.NodeService",
HandlerType: (*NodeServiceServer)(nil),
@@ -656,6 +1183,18 @@ var _NodeService_serviceDesc = grpc.ServiceDesc{
MethodName: "listEnabledNodes",
Handler: _NodeService_ListEnabledNodes_Handler,
},
{
MethodName: "disableNode",
Handler: _NodeService_DisableNode_Handler,
},
{
MethodName: "updateNode",
Handler: _NodeService_UpdateNode_Handler,
},
{
MethodName: "findEnabledNode",
Handler: _NodeService_FindEnabledNode_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "service_node.proto",

View File

@@ -486,7 +486,7 @@ func (x *CountAllEnabledNodeGrantsResponse) GetCount() int64 {
return 0
}
// 列出所有认证
// 列出单页认证
type ListEnabledNodeGrantsRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@@ -589,6 +589,92 @@ func (x *ListEnabledNodeGrantsResponse) GetGrants() []*NodeGrant {
return nil
}
// 获取所有认证信息
type FindAllEnabledNodeGrantsRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *FindAllEnabledNodeGrantsRequest) Reset() {
*x = FindAllEnabledNodeGrantsRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_service_node_grant_proto_msgTypes[10]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *FindAllEnabledNodeGrantsRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*FindAllEnabledNodeGrantsRequest) ProtoMessage() {}
func (x *FindAllEnabledNodeGrantsRequest) ProtoReflect() protoreflect.Message {
mi := &file_service_node_grant_proto_msgTypes[10]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use FindAllEnabledNodeGrantsRequest.ProtoReflect.Descriptor instead.
func (*FindAllEnabledNodeGrantsRequest) Descriptor() ([]byte, []int) {
return file_service_node_grant_proto_rawDescGZIP(), []int{10}
}
type FindAllEnabledNodeGrantsResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Grants []*NodeGrant `protobuf:"bytes,1,rep,name=grants,proto3" json:"grants,omitempty"`
}
func (x *FindAllEnabledNodeGrantsResponse) Reset() {
*x = FindAllEnabledNodeGrantsResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_service_node_grant_proto_msgTypes[11]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *FindAllEnabledNodeGrantsResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*FindAllEnabledNodeGrantsResponse) ProtoMessage() {}
func (x *FindAllEnabledNodeGrantsResponse) ProtoReflect() protoreflect.Message {
mi := &file_service_node_grant_proto_msgTypes[11]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use FindAllEnabledNodeGrantsResponse.ProtoReflect.Descriptor instead.
func (*FindAllEnabledNodeGrantsResponse) Descriptor() ([]byte, []int) {
return file_service_node_grant_proto_rawDescGZIP(), []int{11}
}
func (x *FindAllEnabledNodeGrantsResponse) GetGrants() []*NodeGrant {
if x != nil {
return x.Grants
}
return nil
}
// 获取认证信息
type FindEnabledGrantRequest struct {
state protoimpl.MessageState
@@ -601,7 +687,7 @@ type FindEnabledGrantRequest struct {
func (x *FindEnabledGrantRequest) Reset() {
*x = FindEnabledGrantRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_service_node_grant_proto_msgTypes[10]
mi := &file_service_node_grant_proto_msgTypes[12]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -614,7 +700,7 @@ func (x *FindEnabledGrantRequest) String() string {
func (*FindEnabledGrantRequest) ProtoMessage() {}
func (x *FindEnabledGrantRequest) ProtoReflect() protoreflect.Message {
mi := &file_service_node_grant_proto_msgTypes[10]
mi := &file_service_node_grant_proto_msgTypes[12]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -627,7 +713,7 @@ func (x *FindEnabledGrantRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use FindEnabledGrantRequest.ProtoReflect.Descriptor instead.
func (*FindEnabledGrantRequest) Descriptor() ([]byte, []int) {
return file_service_node_grant_proto_rawDescGZIP(), []int{10}
return file_service_node_grant_proto_rawDescGZIP(), []int{12}
}
func (x *FindEnabledGrantRequest) GetGrantId() int64 {
@@ -648,7 +734,7 @@ type FindEnabledGrantResponse struct {
func (x *FindEnabledGrantResponse) Reset() {
*x = FindEnabledGrantResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_service_node_grant_proto_msgTypes[11]
mi := &file_service_node_grant_proto_msgTypes[13]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -661,7 +747,7 @@ func (x *FindEnabledGrantResponse) String() string {
func (*FindEnabledGrantResponse) ProtoMessage() {}
func (x *FindEnabledGrantResponse) ProtoReflect() protoreflect.Message {
mi := &file_service_node_grant_proto_msgTypes[11]
mi := &file_service_node_grant_proto_msgTypes[13]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -674,7 +760,7 @@ func (x *FindEnabledGrantResponse) ProtoReflect() protoreflect.Message {
// Deprecated: Use FindEnabledGrantResponse.ProtoReflect.Descriptor instead.
func (*FindEnabledGrantResponse) Descriptor() ([]byte, []int) {
return file_service_node_grant_proto_rawDescGZIP(), []int{11}
return file_service_node_grant_proto_rawDescGZIP(), []int{13}
}
func (x *FindEnabledGrantResponse) GetGrant() *NodeGrant {
@@ -744,48 +830,62 @@ var file_service_node_grant_proto_rawDesc = []byte{
0x65, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
0x25, 0x0a, 0x06, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32,
0x0d, 0x2e, 0x70, 0x62, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x52, 0x06,
0x67, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x22, 0x33, 0x0a, 0x17, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e,
0x61, 0x62, 0x6c, 0x65, 0x64, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x12, 0x18, 0x0a, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01,
0x28, 0x03, 0x52, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x49, 0x64, 0x22, 0x3f, 0x0a, 0x18, 0x46,
0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x52,
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x23, 0x0a, 0x05, 0x67, 0x72, 0x61, 0x6e, 0x74,
0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x70, 0x62, 0x2e, 0x4e, 0x6f, 0x64, 0x65,
0x47, 0x72, 0x61, 0x6e, 0x74, 0x52, 0x05, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x32, 0x90, 0x04, 0x0a,
0x10, 0x4e, 0x6f, 0x64, 0x65, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63,
0x65, 0x12, 0x4a, 0x0a, 0x0f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x47,
0x72, 0x61, 0x6e, 0x74, 0x12, 0x1a, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65,
0x4e, 0x6f, 0x64, 0x65, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x1a, 0x1b, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65,
0x47, 0x72, 0x61, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4a, 0x0a,
0x0f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x47, 0x72, 0x61, 0x6e, 0x74,
0x12, 0x1a, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65,
0x47, 0x72, 0x61, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x70,
0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x47, 0x72, 0x61, 0x6e,
0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4d, 0x0a, 0x10, 0x64, 0x69, 0x73,
0x61, 0x62, 0x6c, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x12, 0x1b, 0x2e,
0x70, 0x62, 0x2e, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x47, 0x72,
0x61, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x70, 0x62, 0x2e,
0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x47, 0x72, 0x61, 0x6e, 0x74,
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x68, 0x0a, 0x19, 0x63, 0x6f, 0x75, 0x6e,
0x74, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x47,
0x72, 0x61, 0x6e, 0x74, 0x73, 0x12, 0x24, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74,
0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x47, 0x72,
0x61, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x70, 0x62,
0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64,
0x4e, 0x6f, 0x64, 0x65, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
0x73, 0x65, 0x12, 0x5c, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65,
0x64, 0x4e, 0x6f, 0x64, 0x65, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x12, 0x20, 0x2e, 0x70, 0x62,
0x2e, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x6f, 0x64, 0x65,
0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e,
0x70, 0x62, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x6f,
0x67, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x22, 0x21, 0x0a, 0x1f, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6c,
0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x47, 0x72, 0x61, 0x6e,
0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x49, 0x0a, 0x20, 0x46, 0x69, 0x6e,
0x64, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x47,
0x72, 0x61, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x25, 0x0a,
0x06, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e,
0x70, 0x62, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x52, 0x06, 0x67, 0x72,
0x61, 0x6e, 0x74, 0x73, 0x22, 0x33, 0x0a, 0x17, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62,
0x6c, 0x65, 0x64, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
0x18, 0x0a, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03,
0x52, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x49, 0x64, 0x22, 0x3f, 0x0a, 0x18, 0x46, 0x69, 0x6e,
0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x52, 0x65, 0x73,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x23, 0x0a, 0x05, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x18, 0x01,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x70, 0x62, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x47, 0x72,
0x61, 0x6e, 0x74, 0x52, 0x05, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x32, 0xf7, 0x04, 0x0a, 0x10, 0x4e,
0x6f, 0x64, 0x65, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12,
0x4a, 0x0a, 0x0f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x47, 0x72, 0x61,
0x6e, 0x74, 0x12, 0x1a, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4e, 0x6f,
0x64, 0x65, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b,
0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x47, 0x72,
0x61, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4a, 0x0a, 0x0f, 0x75,
0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x12, 0x1a,
0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x47, 0x72,
0x61, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x70, 0x62, 0x2e,
0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x52,
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4d, 0x0a, 0x10, 0x64, 0x69, 0x73, 0x61, 0x62,
0x6c, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x12, 0x1b, 0x2e, 0x70, 0x62,
0x2e, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x47, 0x72, 0x61, 0x6e,
0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x69,
0x73, 0x61, 0x62, 0x6c, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x52, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x68, 0x0a, 0x19, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41,
0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x47, 0x72, 0x61,
0x6e, 0x74, 0x73, 0x12, 0x24, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x6c,
0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x47, 0x72, 0x61, 0x6e,
0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x70, 0x62, 0x2e, 0x43,
0x6f, 0x75, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x6f,
0x64, 0x65, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x12, 0x4d, 0x0a, 0x10, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x47,
0x72, 0x61, 0x6e, 0x74, 0x12, 0x1b, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e,
0x61, 0x62, 0x6c, 0x65, 0x64, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x1a, 0x1c, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c,
0x65, 0x64, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42,
0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x12, 0x5c, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e,
0x6f, 0x64, 0x65, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x12, 0x20, 0x2e, 0x70, 0x62, 0x2e, 0x4c,
0x69, 0x73, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x47, 0x72,
0x61, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x70, 0x62,
0x2e, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x6f, 0x64, 0x65,
0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x65,
0x0a, 0x18, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64,
0x4e, 0x6f, 0x64, 0x65, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x12, 0x23, 0x2e, 0x70, 0x62, 0x2e,
0x46, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x6f,
0x64, 0x65, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
0x24, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62,
0x6c, 0x65, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4d, 0x0a, 0x10, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61,
0x62, 0x6c, 0x65, 0x64, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x12, 0x1b, 0x2e, 0x70, 0x62, 0x2e, 0x46,
0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64,
0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x33,
}
var (
@@ -800,7 +900,7 @@ func file_service_node_grant_proto_rawDescGZIP() []byte {
return file_service_node_grant_proto_rawDescData
}
var file_service_node_grant_proto_msgTypes = make([]protoimpl.MessageInfo, 12)
var file_service_node_grant_proto_msgTypes = make([]protoimpl.MessageInfo, 14)
var file_service_node_grant_proto_goTypes = []interface{}{
(*CreateNodeGrantRequest)(nil), // 0: pb.CreateNodeGrantRequest
(*CreateNodeGrantResponse)(nil), // 1: pb.CreateNodeGrantResponse
@@ -812,30 +912,35 @@ var file_service_node_grant_proto_goTypes = []interface{}{
(*CountAllEnabledNodeGrantsResponse)(nil), // 7: pb.CountAllEnabledNodeGrantsResponse
(*ListEnabledNodeGrantsRequest)(nil), // 8: pb.ListEnabledNodeGrantsRequest
(*ListEnabledNodeGrantsResponse)(nil), // 9: pb.ListEnabledNodeGrantsResponse
(*FindEnabledGrantRequest)(nil), // 10: pb.FindEnabledGrantRequest
(*FindEnabledGrantResponse)(nil), // 11: pb.FindEnabledGrantResponse
(*NodeGrant)(nil), // 12: pb.NodeGrant
(*FindAllEnabledNodeGrantsRequest)(nil), // 10: pb.FindAllEnabledNodeGrantsRequest
(*FindAllEnabledNodeGrantsResponse)(nil), // 11: pb.FindAllEnabledNodeGrantsResponse
(*FindEnabledGrantRequest)(nil), // 12: pb.FindEnabledGrantRequest
(*FindEnabledGrantResponse)(nil), // 13: pb.FindEnabledGrantResponse
(*NodeGrant)(nil), // 14: pb.NodeGrant
}
var file_service_node_grant_proto_depIdxs = []int32{
12, // 0: pb.ListEnabledNodeGrantsResponse.grants:type_name -> pb.NodeGrant
12, // 1: pb.FindEnabledGrantResponse.grant:type_name -> pb.NodeGrant
0, // 2: pb.NodeGrantService.createNodeGrant:input_type -> pb.CreateNodeGrantRequest
2, // 3: pb.NodeGrantService.updateNodeGrant:input_type -> pb.UpdateNodeGrantRequest
4, // 4: pb.NodeGrantService.disableNodeGrant:input_type -> pb.DisableNodeGrantRequest
6, // 5: pb.NodeGrantService.countAllEnabledNodeGrants:input_type -> pb.CountAllEnabledNodeGrantsRequest
8, // 6: pb.NodeGrantService.ListEnabledNodeGrants:input_type -> pb.ListEnabledNodeGrantsRequest
10, // 7: pb.NodeGrantService.FindEnabledGrant:input_type -> pb.FindEnabledGrantRequest
1, // 8: pb.NodeGrantService.createNodeGrant:output_type -> pb.CreateNodeGrantResponse
3, // 9: pb.NodeGrantService.updateNodeGrant:output_type -> pb.UpdateNodeGrantResponse
5, // 10: pb.NodeGrantService.disableNodeGrant:output_type -> pb.DisableNodeGrantResponse
7, // 11: pb.NodeGrantService.countAllEnabledNodeGrants:output_type -> pb.CountAllEnabledNodeGrantsResponse
9, // 12: pb.NodeGrantService.ListEnabledNodeGrants:output_type -> pb.ListEnabledNodeGrantsResponse
11, // 13: pb.NodeGrantService.FindEnabledGrant:output_type -> pb.FindEnabledGrantResponse
8, // [8:14] is the sub-list for method output_type
2, // [2:8] is the sub-list for method input_type
2, // [2:2] is the sub-list for extension type_name
2, // [2:2] is the sub-list for extension extendee
0, // [0:2] is the sub-list for field type_name
14, // 0: pb.ListEnabledNodeGrantsResponse.grants:type_name -> pb.NodeGrant
14, // 1: pb.FindAllEnabledNodeGrantsResponse.grants:type_name -> pb.NodeGrant
14, // 2: pb.FindEnabledGrantResponse.grant:type_name -> pb.NodeGrant
0, // 3: pb.NodeGrantService.createNodeGrant:input_type -> pb.CreateNodeGrantRequest
2, // 4: pb.NodeGrantService.updateNodeGrant:input_type -> pb.UpdateNodeGrantRequest
4, // 5: pb.NodeGrantService.disableNodeGrant:input_type -> pb.DisableNodeGrantRequest
6, // 6: pb.NodeGrantService.countAllEnabledNodeGrants:input_type -> pb.CountAllEnabledNodeGrantsRequest
8, // 7: pb.NodeGrantService.ListEnabledNodeGrants:input_type -> pb.ListEnabledNodeGrantsRequest
10, // 8: pb.NodeGrantService.FindAllEnabledNodeGrants:input_type -> pb.FindAllEnabledNodeGrantsRequest
12, // 9: pb.NodeGrantService.FindEnabledGrant:input_type -> pb.FindEnabledGrantRequest
1, // 10: pb.NodeGrantService.createNodeGrant:output_type -> pb.CreateNodeGrantResponse
3, // 11: pb.NodeGrantService.updateNodeGrant:output_type -> pb.UpdateNodeGrantResponse
5, // 12: pb.NodeGrantService.disableNodeGrant:output_type -> pb.DisableNodeGrantResponse
7, // 13: pb.NodeGrantService.countAllEnabledNodeGrants:output_type -> pb.CountAllEnabledNodeGrantsResponse
9, // 14: pb.NodeGrantService.ListEnabledNodeGrants:output_type -> pb.ListEnabledNodeGrantsResponse
11, // 15: pb.NodeGrantService.FindAllEnabledNodeGrants:output_type -> pb.FindAllEnabledNodeGrantsResponse
13, // 16: pb.NodeGrantService.FindEnabledGrant:output_type -> pb.FindEnabledGrantResponse
10, // [10:17] is the sub-list for method output_type
3, // [3:10] is the sub-list for method input_type
3, // [3:3] is the sub-list for extension type_name
3, // [3:3] is the sub-list for extension extendee
0, // [0:3] is the sub-list for field type_name
}
func init() { file_service_node_grant_proto_init() }
@@ -966,7 +1071,7 @@ func file_service_node_grant_proto_init() {
}
}
file_service_node_grant_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*FindEnabledGrantRequest); i {
switch v := v.(*FindAllEnabledNodeGrantsRequest); i {
case 0:
return &v.state
case 1:
@@ -978,6 +1083,30 @@ func file_service_node_grant_proto_init() {
}
}
file_service_node_grant_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*FindAllEnabledNodeGrantsResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_service_node_grant_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*FindEnabledGrantRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_service_node_grant_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*FindEnabledGrantResponse); i {
case 0:
return &v.state
@@ -996,7 +1125,7 @@ func file_service_node_grant_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_service_node_grant_proto_rawDesc,
NumEnums: 0,
NumMessages: 12,
NumMessages: 14,
NumExtensions: 0,
NumServices: 1,
},
@@ -1030,9 +1159,11 @@ type NodeGrantServiceClient interface {
DisableNodeGrant(ctx context.Context, in *DisableNodeGrantRequest, opts ...grpc.CallOption) (*DisableNodeGrantResponse, error)
// 计算认证的数量
CountAllEnabledNodeGrants(ctx context.Context, in *CountAllEnabledNodeGrantsRequest, opts ...grpc.CallOption) (*CountAllEnabledNodeGrantsResponse, error)
// 列出所有认证
// 列出单页认证
ListEnabledNodeGrants(ctx context.Context, in *ListEnabledNodeGrantsRequest, opts ...grpc.CallOption) (*ListEnabledNodeGrantsResponse, error)
// 获取认证信息
// 列出所有认证
FindAllEnabledNodeGrants(ctx context.Context, in *FindAllEnabledNodeGrantsRequest, opts ...grpc.CallOption) (*FindAllEnabledNodeGrantsResponse, error)
// 获取单个认证信息
FindEnabledGrant(ctx context.Context, in *FindEnabledGrantRequest, opts ...grpc.CallOption) (*FindEnabledGrantResponse, error)
}
@@ -1089,6 +1220,15 @@ func (c *nodeGrantServiceClient) ListEnabledNodeGrants(ctx context.Context, in *
return out, nil
}
func (c *nodeGrantServiceClient) FindAllEnabledNodeGrants(ctx context.Context, in *FindAllEnabledNodeGrantsRequest, opts ...grpc.CallOption) (*FindAllEnabledNodeGrantsResponse, error) {
out := new(FindAllEnabledNodeGrantsResponse)
err := c.cc.Invoke(ctx, "/pb.NodeGrantService/FindAllEnabledNodeGrants", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *nodeGrantServiceClient) FindEnabledGrant(ctx context.Context, in *FindEnabledGrantRequest, opts ...grpc.CallOption) (*FindEnabledGrantResponse, error) {
out := new(FindEnabledGrantResponse)
err := c.cc.Invoke(ctx, "/pb.NodeGrantService/FindEnabledGrant", in, out, opts...)
@@ -1108,9 +1248,11 @@ type NodeGrantServiceServer interface {
DisableNodeGrant(context.Context, *DisableNodeGrantRequest) (*DisableNodeGrantResponse, error)
// 计算认证的数量
CountAllEnabledNodeGrants(context.Context, *CountAllEnabledNodeGrantsRequest) (*CountAllEnabledNodeGrantsResponse, error)
// 列出所有认证
// 列出单页认证
ListEnabledNodeGrants(context.Context, *ListEnabledNodeGrantsRequest) (*ListEnabledNodeGrantsResponse, error)
// 获取认证信息
// 列出所有认证
FindAllEnabledNodeGrants(context.Context, *FindAllEnabledNodeGrantsRequest) (*FindAllEnabledNodeGrantsResponse, error)
// 获取单个认证信息
FindEnabledGrant(context.Context, *FindEnabledGrantRequest) (*FindEnabledGrantResponse, error)
}
@@ -1133,6 +1275,9 @@ func (*UnimplementedNodeGrantServiceServer) CountAllEnabledNodeGrants(context.Co
func (*UnimplementedNodeGrantServiceServer) ListEnabledNodeGrants(context.Context, *ListEnabledNodeGrantsRequest) (*ListEnabledNodeGrantsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListEnabledNodeGrants not implemented")
}
func (*UnimplementedNodeGrantServiceServer) FindAllEnabledNodeGrants(context.Context, *FindAllEnabledNodeGrantsRequest) (*FindAllEnabledNodeGrantsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method FindAllEnabledNodeGrants not implemented")
}
func (*UnimplementedNodeGrantServiceServer) FindEnabledGrant(context.Context, *FindEnabledGrantRequest) (*FindEnabledGrantResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method FindEnabledGrant not implemented")
}
@@ -1231,6 +1376,24 @@ func _NodeGrantService_ListEnabledNodeGrants_Handler(srv interface{}, ctx contex
return interceptor(ctx, in, info, handler)
}
func _NodeGrantService_FindAllEnabledNodeGrants_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(FindAllEnabledNodeGrantsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(NodeGrantServiceServer).FindAllEnabledNodeGrants(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/pb.NodeGrantService/FindAllEnabledNodeGrants",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(NodeGrantServiceServer).FindAllEnabledNodeGrants(ctx, req.(*FindAllEnabledNodeGrantsRequest))
}
return interceptor(ctx, in, info, handler)
}
func _NodeGrantService_FindEnabledGrant_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(FindEnabledGrantRequest)
if err := dec(in); err != nil {
@@ -1273,6 +1436,10 @@ var _NodeGrantService_serviceDesc = grpc.ServiceDesc{
MethodName: "ListEnabledNodeGrants",
Handler: _NodeGrantService_ListEnabledNodeGrants_Handler,
},
{
MethodName: "FindAllEnabledNodeGrants",
Handler: _NodeGrantService_FindAllEnabledNodeGrants_Handler,
},
{
MethodName: "FindEnabledGrant",
Handler: _NodeGrantService_FindEnabledGrant_Handler,

View File

@@ -3,6 +3,7 @@ option go_package = "./pb";
package pb;
import "model_node.proto";
import "model_node_login.proto";
service NodeService {
// 创建节点
@@ -13,12 +14,22 @@ service NodeService {
// 列出单页节点
rpc listEnabledNodes (ListEnabledNodesRequest) returns (ListEnabledNodesResponse);
// 禁用节点
rpc disableNode (DisableNodeRequest) returns (DisableNodeResponse);
// 修改节点
rpc updateNode(UpdateNodeRequest) returns (UpdateNodeResponse);
// 查看单个节点
rpc findEnabledNode(FindEnabledNodeRequest) returns (FindEnabledNodeResponse);
}
// 创建节点
message CreateNodeRequest {
string name = 1;
int64 clusterId = 2;
NodeLogin Login = 3;
}
message CreateNodeResponse {
@@ -43,3 +54,33 @@ message ListEnabledNodesRequest {
message ListEnabledNodesResponse {
repeated Node nodes = 1;
}
// 禁用节点
message DisableNodeRequest {
int64 nodeId = 1;
}
message DisableNodeResponse {
}
// 修改节点
message UpdateNodeRequest {
int64 nodeId = 1;
string name = 2;
int64 clusterId = 3;
NodeLogin Login = 4;
}
message UpdateNodeResponse {
}
// 查找节点
message FindEnabledNodeRequest {
int64 nodeId = 1;
}
message FindEnabledNodeResponse {
Node node = 1;
}

View File

@@ -17,10 +17,13 @@ service NodeGrantService {
// 计算认证的数量
rpc countAllEnabledNodeGrants (CountAllEnabledNodeGrantsRequest) returns (CountAllEnabledNodeGrantsResponse);
// 列出所有认证
// 列出单页认证
rpc ListEnabledNodeGrants (ListEnabledNodeGrantsRequest) returns (ListEnabledNodeGrantsResponse);
// 获取认证信息
// 列出所有认证
rpc FindAllEnabledNodeGrants(FindAllEnabledNodeGrantsRequest) returns (FindAllEnabledNodeGrantsResponse);
// 获取单个认证信息
rpc FindEnabledGrant(FindEnabledGrantRequest) returns (FindEnabledGrantResponse);
}
@@ -73,7 +76,7 @@ message CountAllEnabledNodeGrantsResponse {
int64 count = 1;
}
// 列出所有认证
// 列出单页认证
message ListEnabledNodeGrantsRequest {
int64 offset = 1;
int64 size = 2;
@@ -83,6 +86,15 @@ message ListEnabledNodeGrantsResponse {
repeated NodeGrant grants = 1;
}
// 获取所有认证信息
message FindAllEnabledNodeGrantsRequest {
}
message FindAllEnabledNodeGrantsResponse {
repeated NodeGrant grants = 1;
}
// 获取认证信息
message FindEnabledGrantRequest {
int64 grantId = 1;

View File

@@ -22,7 +22,7 @@ func TestRPCClient_NodeRPC(t *testing.T) {
if err != nil {
t.Fatal(err)
}
resp, err := rpc.AdminRPC().Login(rpc.Context(0), &pb.AdminLoginRequest{
resp, err := rpc.AdminRPC().LoginAdmin(rpc.Context(0), &pb.LoginAdminRequest{
Username: "admin",
Password: stringutil.Md5("123456"),
})

View File

@@ -40,6 +40,9 @@ func (this *CreateAction) RunGet(params struct{}) {
func (this *CreateAction) RunPost(params struct {
Name string
ClusterId int64
GrantId int64
SshHost string
SshPort int
Must *actions.Must
}) {
@@ -52,12 +55,23 @@ func (this *CreateAction) RunPost(params struct {
this.Fail("请选择所在集群")
}
// TODO 检查SSH授权
// TODO 检查登录授权
loginInfo := &pb.NodeLogin{
Id: 0,
Name: "SSH",
Type: "ssh",
Params: maps.Map{
"grantId": params.GrantId,
"host": params.SshHost,
"port": params.SshPort,
}.AsJSON(),
}
// 保存
_, err := this.RPC().NodeRPC().CreateNode(this.AdminContext(), &pb.CreateNodeRequest{
Name: params.Name,
ClusterId: params.ClusterId,
Login: loginInfo,
})
if err != nil {
this.ErrorPage(err)

View File

@@ -0,0 +1,22 @@
package nodes
import (
"github.com/TeaOSLab/EdgeAdmin/internal/rpc/pb"
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/actionutils"
)
type DeleteAction struct {
actionutils.ParentAction
}
func (this *DeleteAction) RunPost(params struct {
NodeId int64
}) {
_, err := this.RPC().NodeRPC().DisableNode(this.AdminContext(), &pb.DisableNodeRequest{NodeId: params.NodeId})
if err != nil {
this.ErrorPage(err)
return
}
this.Success()
}

View File

@@ -0,0 +1,74 @@
package grants
import (
"github.com/TeaOSLab/EdgeAdmin/internal/rpc/pb"
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/actionutils"
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/default/nodes/grants/grantutils"
"github.com/iwind/TeaGo/actions"
"github.com/iwind/TeaGo/maps"
)
type CreatePopupAction struct {
actionutils.ParentAction
}
func (this *CreatePopupAction) Init() {
this.Nav("", "", "")
}
func (this *CreatePopupAction) RunGet(params struct{}) {
this.Data["methods"] = grantutils.AllGrantMethods()
this.Show()
}
func (this *CreatePopupAction) RunPost(params struct {
Name string
Method string
Username string
Password string
PrivateKey string
Description string
Must *actions.Must
}) {
params.Must.
Field("name", params.Name).
Require("请输入名称")
switch params.Method {
case "user":
if len(params.Username) == 0 {
this.FailField("username", "请输入SSH登录用户名")
}
case "privateKey":
if len(params.PrivateKey) == 0 {
this.FailField("privateKey", "请输入RSA私钥")
}
default:
this.Fail("请选择正确的认证方式")
}
createResp, err := this.RPC().NodeGrantRPC().CreateNodeGrant(this.AdminContext(), &pb.CreateNodeGrantRequest{
Name: params.Name,
Method: params.Method,
Username: params.Username,
Password: params.Password,
PrivateKey: params.PrivateKey,
Description: params.Description,
NodeId: 0,
})
if err != nil {
this.ErrorPage(err)
return
}
this.Data["grant"] = maps.Map{
"id": createResp.GrantId,
"name": params.Name,
"method": params.Method,
"methodName": grantutils.FindGrantMethodName(params.Method),
}
this.Success()
}

View File

@@ -0,0 +1,72 @@
package grants
import (
"github.com/TeaOSLab/EdgeAdmin/internal/rpc/pb"
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/actionutils"
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/default/nodes/grants/grantutils"
"github.com/iwind/TeaGo/actions"
"github.com/iwind/TeaGo/maps"
)
type SelectPopupAction struct {
actionutils.ParentAction
}
func (this *SelectPopupAction) Init() {
this.Nav("", "", "")
}
func (this *SelectPopupAction) RunGet(params struct{}) {
// 所有的认证
grantsResp, err := this.RPC().NodeGrantRPC().FindAllEnabledNodeGrants(this.AdminContext(), &pb.FindAllEnabledNodeGrantsRequest{})
if err != nil {
this.ErrorPage(err)
return
}
grants := grantsResp.Grants
grantMaps := []maps.Map{}
for _, grant := range grants {
grantMaps = append(grantMaps, maps.Map{
"id": grant.Id,
"name": grant.Name,
"method": grant.Method,
"methodName": grantutils.FindGrantMethodName(grant.Method),
})
}
this.Data["grants"] = grantMaps
this.Show()
}
func (this *SelectPopupAction) RunPost(params struct {
GrantId int64
Must *actions.Must
}) {
if params.GrantId <= 0 {
this.Data["grant"] = maps.Map{
"id": params.GrantId,
"name": "",
"method": "",
"methodName": "",
}
this.Success()
}
grantResp, err := this.RPC().NodeGrantRPC().FindEnabledGrant(this.AdminContext(), &pb.FindEnabledGrantRequest{GrantId: params.GrantId})
if err != nil {
this.ErrorPage(err)
return
}
grant := grantResp.Grant
if grant == nil {
this.Fail("找不到要使用的认证")
}
this.Data["grant"] = maps.Map{
"id": grant.Id,
"name": grant.Name,
"method": grant.Method,
"methodName": grantutils.FindGrantMethodName(grant.Method),
}
this.Success()
}

View File

@@ -14,6 +14,9 @@ func init() {
Prefix("/nodes").
Get("", new(IndexAction)).
GetPost("/create", new(CreateAction)).
Post("/delete", new(DeleteAction)).
GetPost("/update", new(UpdateAction)).
Get("/node", new(NodeAction)).
// 授权管理
Get("/grants", new(grants.IndexAction)).
@@ -21,6 +24,8 @@ func init() {
GetPost("/grants/update", new(grants.UpdateAction)).
Post("/grants/delete", new(grants.DeleteAction)).
Get("/grants/grant", new(grants.GrantAction)).
GetPost("/grants/selectPopup", new(grants.SelectPopupAction)).
GetPost("/grants/createPopup", new(grants.CreatePopupAction)).
EndAll()
})
}

View File

@@ -0,0 +1,89 @@
package nodes
import (
"encoding/json"
"github.com/TeaOSLab/EdgeAdmin/internal/rpc/pb"
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/actionutils"
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/default/nodes/grants/grantutils"
"github.com/iwind/TeaGo/maps"
)
type NodeAction struct {
actionutils.ParentAction
}
func (this *NodeAction) Init() {
this.Nav("", "node", "index")
}
func (this *NodeAction) RunGet(params struct {
NodeId int64
}) {
this.Data["nodeId"] = params.NodeId
nodeResp, err := this.RPC().NodeRPC().FindEnabledNode(this.AdminContext(), &pb.FindEnabledNodeRequest{NodeId: params.NodeId})
if err != nil {
this.ErrorPage(err)
return
}
node := nodeResp.Node
if node == nil {
this.WriteString("找不到要操作的节点")
return
}
var clusterMap maps.Map = nil
if node.Cluster != nil {
clusterMap = maps.Map{
"id": node.Cluster.Id,
"name": node.Cluster.Name,
}
}
var loginMap maps.Map = nil
if node.Login != nil {
loginParams := maps.Map{}
if len(node.Login.Params) > 0 {
err = json.Unmarshal(node.Login.Params, &loginParams)
if err != nil {
this.ErrorPage(err)
return
}
}
grantMap := maps.Map{}
grantId := loginParams.GetInt64("grantId")
if grantId > 0 {
grantResp, err := this.RPC().NodeGrantRPC().FindEnabledGrant(this.AdminContext(), &pb.FindEnabledGrantRequest{GrantId: grantId})
if err != nil {
this.ErrorPage(err)
return
}
if grantResp.Grant != nil {
grantMap = maps.Map{
"id": grantResp.Grant.Id,
"name": grantResp.Grant.Name,
"method": grantResp.Grant.Method,
"methodName": grantutils.FindGrantMethodName(grantResp.Grant.Method),
}
}
}
loginMap = maps.Map{
"id": node.Login.Id,
"name": node.Login.Name,
"type": node.Login.Type,
"params": loginParams,
"grant": grantMap,
}
}
this.Data["node"] = maps.Map{
"id": node.Id,
"name": node.Name,
"cluster": clusterMap,
"login": loginMap,
}
this.Show()
}

View File

@@ -0,0 +1,159 @@
package nodes
import (
"encoding/json"
"github.com/TeaOSLab/EdgeAdmin/internal/rpc/pb"
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/actionutils"
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/default/nodes/grants/grantutils"
"github.com/iwind/TeaGo/actions"
"github.com/iwind/TeaGo/maps"
)
type UpdateAction struct {
actionutils.ParentAction
}
func (this *UpdateAction) Init() {
this.Nav("", "node", "index")
}
func (this *UpdateAction) RunGet(params struct {
NodeId int64
}) {
this.Data["nodeId"] = params.NodeId
nodeResp, err := this.RPC().NodeRPC().FindEnabledNode(this.AdminContext(), &pb.FindEnabledNodeRequest{NodeId: params.NodeId})
if err != nil {
this.ErrorPage(err)
return
}
node := nodeResp.Node
if node == nil {
this.WriteString("找不到要操作的节点")
return
}
var clusterMap maps.Map = nil
if node.Cluster != nil {
clusterMap = maps.Map{
"id": node.Cluster.Id,
"name": node.Cluster.Name,
}
}
var loginMap maps.Map = nil
if node.Login != nil {
loginParams := maps.Map{}
if len(node.Login.Params) > 0 {
err = json.Unmarshal(node.Login.Params, &loginParams)
if err != nil {
this.ErrorPage(err)
return
}
}
grantMap := maps.Map{}
grantId := loginParams.GetInt64("grantId")
if grantId > 0 {
grantResp, err := this.RPC().NodeGrantRPC().FindEnabledGrant(this.AdminContext(), &pb.FindEnabledGrantRequest{GrantId: grantId})
if err != nil {
this.ErrorPage(err)
return
}
if grantResp.Grant != nil {
grantMap = maps.Map{
"id": grantResp.Grant.Id,
"name": grantResp.Grant.Name,
"method": grantResp.Grant.Method,
"methodName": grantutils.FindGrantMethodName(grantResp.Grant.Method),
}
}
}
loginMap = maps.Map{
"id": node.Login.Id,
"name": node.Login.Name,
"type": node.Login.Type,
"params": loginParams,
"grant": grantMap,
}
}
this.Data["node"] = maps.Map{
"id": node.Id,
"name": node.Name,
"cluster": clusterMap,
"login": loginMap,
}
// 所有集群
resp, err := this.RPC().NodeClusterRPC().FindAllEnabledClusters(this.AdminContext(), &pb.FindAllEnabledNodeClustersRequest{})
if err != nil {
this.ErrorPage(err)
}
if err != nil {
this.ErrorPage(err)
return
}
clusterMaps := []maps.Map{}
for _, cluster := range resp.Clusters {
clusterMaps = append(clusterMaps, maps.Map{
"id": cluster.Id,
"name": cluster.Name,
})
}
this.Data["clusters"] = clusterMaps
this.Show()
}
func (this *UpdateAction) RunPost(params struct {
LoginId int64
NodeId int64
Name string
ClusterId int64
GrantId int64
SshHost string
SshPort int
Must *actions.Must
}) {
if params.NodeId <= 0 {
this.Fail("要操作的节点不存在")
}
params.Must.
Field("name", params.Name).
Require("请输入节点名称")
// TODO 检查cluster
if params.ClusterId <= 0 {
this.Fail("请选择所在集群")
}
// TODO 检查登录授权
loginInfo := &pb.NodeLogin{
Id: params.LoginId,
Name: "SSH",
Type: "ssh",
Params: maps.Map{
"grantId": params.GrantId,
"host": params.SshHost,
"port": params.SshPort,
}.AsJSON(),
}
// 保存
_, err := this.RPC().NodeRPC().UpdateNode(this.AdminContext(), &pb.UpdateNodeRequest{
NodeId: params.NodeId,
Name: params.Name,
ClusterId: params.ClusterId,
Login: loginInfo,
})
if err != nil {
this.ErrorPage(err)
return
}
this.Success()
}