diff --git a/pkg/rpc/pb/model_admin.pb.go b/pkg/rpc/pb/model_admin.pb.go index 0c38c6f..60d6583 100644 --- a/pkg/rpc/pb/model_admin.pb.go +++ b/pkg/rpc/pb/model_admin.pb.go @@ -30,10 +30,13 @@ type Admin struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - Fullname string `protobuf:"bytes,2,opt,name=fullname,proto3" json:"fullname,omitempty"` - Username string `protobuf:"bytes,3,opt,name=username,proto3" json:"username,omitempty"` - IsOn bool `protobuf:"varint,4,opt,name=isOn,proto3" json:"isOn,omitempty"` + Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + Fullname string `protobuf:"bytes,2,opt,name=fullname,proto3" json:"fullname,omitempty"` + Username string `protobuf:"bytes,3,opt,name=username,proto3" json:"username,omitempty"` + IsOn bool `protobuf:"varint,4,opt,name=isOn,proto3" json:"isOn,omitempty"` + IsSuper bool `protobuf:"varint,5,opt,name=isSuper,proto3" json:"isSuper,omitempty"` + CreatedAt int64 `protobuf:"varint,6,opt,name=createdAt,proto3" json:"createdAt,omitempty"` + Modules []*AdminModule `protobuf:"bytes,7,rep,name=Modules,proto3" json:"Modules,omitempty"` } func (x *Admin) Reset() { @@ -96,18 +99,47 @@ func (x *Admin) GetIsOn() bool { return false } +func (x *Admin) GetIsSuper() bool { + if x != nil { + return x.IsSuper + } + return false +} + +func (x *Admin) GetCreatedAt() int64 { + if x != nil { + return x.CreatedAt + } + return 0 +} + +func (x *Admin) GetModules() []*AdminModule { + if x != nil { + return x.Modules + } + return nil +} + var File_model_admin_proto protoreflect.FileDescriptor var file_model_admin_proto_rawDesc = []byte{ 0x0a, 0x11, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x22, 0x63, 0x0a, 0x05, 0x41, 0x64, 0x6d, 0x69, 0x6e, - 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, - 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x75, 0x6c, 0x6c, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x08, 0x66, 0x75, 0x6c, 0x6c, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, - 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, - 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x73, 0x4f, 0x6e, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x69, 0x73, 0x4f, 0x6e, 0x42, 0x06, 0x5a, 0x04, - 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x1a, 0x18, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x61, + 0x64, 0x6d, 0x69, 0x6e, 0x5f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x22, 0xc6, 0x01, 0x0a, 0x05, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x66, + 0x75, 0x6c, 0x6c, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, + 0x75, 0x6c, 0x6c, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, + 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x73, 0x4f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x04, 0x69, 0x73, 0x4f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x69, 0x73, 0x53, 0x75, 0x70, + 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x69, 0x73, 0x53, 0x75, 0x70, 0x65, + 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, + 0x29, 0x0a, 0x07, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x0f, 0x2e, 0x70, 0x62, 0x2e, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, + 0x65, 0x52, 0x07, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, + 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -124,14 +156,16 @@ func file_model_admin_proto_rawDescGZIP() []byte { var file_model_admin_proto_msgTypes = make([]protoimpl.MessageInfo, 1) var file_model_admin_proto_goTypes = []interface{}{ - (*Admin)(nil), // 0: pb.Admin + (*Admin)(nil), // 0: pb.Admin + (*AdminModule)(nil), // 1: pb.AdminModule } var file_model_admin_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 + 1, // 0: pb.Admin.Modules:type_name -> pb.AdminModule + 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 } func init() { file_model_admin_proto_init() } @@ -139,6 +173,7 @@ func file_model_admin_proto_init() { if File_model_admin_proto != nil { return } + file_model_admin_module_proto_init() if !protoimpl.UnsafeEnabled { file_model_admin_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Admin); i { diff --git a/pkg/rpc/pb/model_admin_list.pb.go b/pkg/rpc/pb/model_admin_list.pb.go new file mode 100644 index 0000000..85f0ce6 --- /dev/null +++ b/pkg/rpc/pb/model_admin_list.pb.go @@ -0,0 +1,172 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.25.0 +// protoc v3.12.3 +// source: model_admin_list.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 AdminModuleList struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + AdminId int64 `protobuf:"varint,1,opt,name=adminId,proto3" json:"adminId,omitempty"` + IsSuper bool `protobuf:"varint,2,opt,name=isSuper,proto3" json:"isSuper,omitempty"` + Modules []*AdminModule `protobuf:"bytes,3,rep,name=Modules,proto3" json:"Modules,omitempty"` +} + +func (x *AdminModuleList) Reset() { + *x = AdminModuleList{} + if protoimpl.UnsafeEnabled { + mi := &file_model_admin_list_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AdminModuleList) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AdminModuleList) ProtoMessage() {} + +func (x *AdminModuleList) ProtoReflect() protoreflect.Message { + mi := &file_model_admin_list_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 AdminModuleList.ProtoReflect.Descriptor instead. +func (*AdminModuleList) Descriptor() ([]byte, []int) { + return file_model_admin_list_proto_rawDescGZIP(), []int{0} +} + +func (x *AdminModuleList) GetAdminId() int64 { + if x != nil { + return x.AdminId + } + return 0 +} + +func (x *AdminModuleList) GetIsSuper() bool { + if x != nil { + return x.IsSuper + } + return false +} + +func (x *AdminModuleList) GetModules() []*AdminModule { + if x != nil { + return x.Modules + } + return nil +} + +var File_model_admin_list_proto protoreflect.FileDescriptor + +var file_model_admin_list_proto_rawDesc = []byte{ + 0x0a, 0x16, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x5f, 0x6c, 0x69, + 0x73, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x1a, 0x18, 0x6d, 0x6f, + 0x64, 0x65, 0x6c, 0x5f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x5f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x70, 0x0a, 0x0f, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x4d, + 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x6d, + 0x69, 0x6e, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x61, 0x64, 0x6d, 0x69, + 0x6e, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x69, 0x73, 0x53, 0x75, 0x70, 0x65, 0x72, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x69, 0x73, 0x53, 0x75, 0x70, 0x65, 0x72, 0x12, 0x29, 0x0a, + 0x07, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, + 0x2e, 0x70, 0x62, 0x2e, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x52, + 0x07, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_model_admin_list_proto_rawDescOnce sync.Once + file_model_admin_list_proto_rawDescData = file_model_admin_list_proto_rawDesc +) + +func file_model_admin_list_proto_rawDescGZIP() []byte { + file_model_admin_list_proto_rawDescOnce.Do(func() { + file_model_admin_list_proto_rawDescData = protoimpl.X.CompressGZIP(file_model_admin_list_proto_rawDescData) + }) + return file_model_admin_list_proto_rawDescData +} + +var file_model_admin_list_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_model_admin_list_proto_goTypes = []interface{}{ + (*AdminModuleList)(nil), // 0: pb.AdminModuleList + (*AdminModule)(nil), // 1: pb.AdminModule +} +var file_model_admin_list_proto_depIdxs = []int32{ + 1, // 0: pb.AdminModuleList.Modules:type_name -> pb.AdminModule + 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 +} + +func init() { file_model_admin_list_proto_init() } +func file_model_admin_list_proto_init() { + if File_model_admin_list_proto != nil { + return + } + file_model_admin_module_proto_init() + if !protoimpl.UnsafeEnabled { + file_model_admin_list_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AdminModuleList); 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_admin_list_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_model_admin_list_proto_goTypes, + DependencyIndexes: file_model_admin_list_proto_depIdxs, + MessageInfos: file_model_admin_list_proto_msgTypes, + }.Build() + File_model_admin_list_proto = out.File + file_model_admin_list_proto_rawDesc = nil + file_model_admin_list_proto_goTypes = nil + file_model_admin_list_proto_depIdxs = nil +} diff --git a/pkg/rpc/pb/model_admin_module.pb.go b/pkg/rpc/pb/model_admin_module.pb.go new file mode 100644 index 0000000..61a7b40 --- /dev/null +++ b/pkg/rpc/pb/model_admin_module.pb.go @@ -0,0 +1,166 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.25.0 +// protoc v3.12.3 +// source: model_admin_module.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 AdminModule struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + AllowAll bool `protobuf:"varint,1,opt,name=allowAll,proto3" json:"allowAll,omitempty"` + Code string `protobuf:"bytes,2,opt,name=code,proto3" json:"code,omitempty"` + Actions []string `protobuf:"bytes,3,rep,name=actions,proto3" json:"actions,omitempty"` +} + +func (x *AdminModule) Reset() { + *x = AdminModule{} + if protoimpl.UnsafeEnabled { + mi := &file_model_admin_module_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AdminModule) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AdminModule) ProtoMessage() {} + +func (x *AdminModule) ProtoReflect() protoreflect.Message { + mi := &file_model_admin_module_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 AdminModule.ProtoReflect.Descriptor instead. +func (*AdminModule) Descriptor() ([]byte, []int) { + return file_model_admin_module_proto_rawDescGZIP(), []int{0} +} + +func (x *AdminModule) GetAllowAll() bool { + if x != nil { + return x.AllowAll + } + return false +} + +func (x *AdminModule) GetCode() string { + if x != nil { + return x.Code + } + return "" +} + +func (x *AdminModule) GetActions() []string { + if x != nil { + return x.Actions + } + return nil +} + +var File_model_admin_module_proto protoreflect.FileDescriptor + +var file_model_admin_module_proto_rawDesc = []byte{ + 0x0a, 0x18, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x5f, 0x6d, 0x6f, + 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x22, 0x57, + 0x0a, 0x0b, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x12, 0x1a, 0x0a, + 0x08, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x41, 0x6c, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x08, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x41, 0x6c, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x18, 0x0a, + 0x07, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, + 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_model_admin_module_proto_rawDescOnce sync.Once + file_model_admin_module_proto_rawDescData = file_model_admin_module_proto_rawDesc +) + +func file_model_admin_module_proto_rawDescGZIP() []byte { + file_model_admin_module_proto_rawDescOnce.Do(func() { + file_model_admin_module_proto_rawDescData = protoimpl.X.CompressGZIP(file_model_admin_module_proto_rawDescData) + }) + return file_model_admin_module_proto_rawDescData +} + +var file_model_admin_module_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_model_admin_module_proto_goTypes = []interface{}{ + (*AdminModule)(nil), // 0: pb.AdminModule +} +var file_model_admin_module_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_admin_module_proto_init() } +func file_model_admin_module_proto_init() { + if File_model_admin_module_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_model_admin_module_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AdminModule); 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_admin_module_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_model_admin_module_proto_goTypes, + DependencyIndexes: file_model_admin_module_proto_depIdxs, + MessageInfos: file_model_admin_module_proto_msgTypes, + }.Build() + File_model_admin_module_proto = out.File + file_model_admin_module_proto_rawDesc = nil + file_model_admin_module_proto_goTypes = nil + file_model_admin_module_proto_depIdxs = nil +} diff --git a/pkg/rpc/pb/service_admin.pb.go b/pkg/rpc/pb/service_admin.pb.go index 23c5eaf..4026640 100644 --- a/pkg/rpc/pb/service_admin.pb.go +++ b/pkg/rpc/pb/service_admin.pb.go @@ -648,7 +648,7 @@ func (x *CreateOrUpdateAdminResponse) GetAdminId() int64 { } // 修改管理员信息 -type UpdateAdminRequest struct { +type UpdateAdminInfoRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -657,8 +657,8 @@ type UpdateAdminRequest struct { Fullname string `protobuf:"bytes,2,opt,name=fullname,proto3" json:"fullname,omitempty"` } -func (x *UpdateAdminRequest) Reset() { - *x = UpdateAdminRequest{} +func (x *UpdateAdminInfoRequest) Reset() { + *x = UpdateAdminInfoRequest{} if protoimpl.UnsafeEnabled { mi := &file_service_admin_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -666,13 +666,13 @@ func (x *UpdateAdminRequest) Reset() { } } -func (x *UpdateAdminRequest) String() string { +func (x *UpdateAdminInfoRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*UpdateAdminRequest) ProtoMessage() {} +func (*UpdateAdminInfoRequest) ProtoMessage() {} -func (x *UpdateAdminRequest) ProtoReflect() protoreflect.Message { +func (x *UpdateAdminInfoRequest) ProtoReflect() protoreflect.Message { mi := &file_service_admin_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -684,19 +684,19 @@ func (x *UpdateAdminRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use UpdateAdminRequest.ProtoReflect.Descriptor instead. -func (*UpdateAdminRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use UpdateAdminInfoRequest.ProtoReflect.Descriptor instead. +func (*UpdateAdminInfoRequest) Descriptor() ([]byte, []int) { return file_service_admin_proto_rawDescGZIP(), []int{12} } -func (x *UpdateAdminRequest) GetAdminId() int64 { +func (x *UpdateAdminInfoRequest) GetAdminId() int64 { if x != nil { return x.AdminId } return 0 } -func (x *UpdateAdminRequest) GetFullname() string { +func (x *UpdateAdminInfoRequest) GetFullname() string { if x != nil { return x.Fullname } @@ -767,114 +767,681 @@ func (x *UpdateAdminLoginRequest) GetPassword() string { return "" } +// 获取管理所有权限列表 +type FindAllAdminModulesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *FindAllAdminModulesRequest) Reset() { + *x = FindAllAdminModulesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_service_admin_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FindAllAdminModulesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FindAllAdminModulesRequest) ProtoMessage() {} + +func (x *FindAllAdminModulesRequest) ProtoReflect() protoreflect.Message { + mi := &file_service_admin_proto_msgTypes[14] + 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 FindAllAdminModulesRequest.ProtoReflect.Descriptor instead. +func (*FindAllAdminModulesRequest) Descriptor() ([]byte, []int) { + return file_service_admin_proto_rawDescGZIP(), []int{14} +} + +type FindAllAdminModulesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + AdminModules []*AdminModuleList `protobuf:"bytes,1,rep,name=adminModules,proto3" json:"adminModules,omitempty"` +} + +func (x *FindAllAdminModulesResponse) Reset() { + *x = FindAllAdminModulesResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_service_admin_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FindAllAdminModulesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FindAllAdminModulesResponse) ProtoMessage() {} + +func (x *FindAllAdminModulesResponse) ProtoReflect() protoreflect.Message { + mi := &file_service_admin_proto_msgTypes[15] + 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 FindAllAdminModulesResponse.ProtoReflect.Descriptor instead. +func (*FindAllAdminModulesResponse) Descriptor() ([]byte, []int) { + return file_service_admin_proto_rawDescGZIP(), []int{15} +} + +func (x *FindAllAdminModulesResponse) GetAdminModules() []*AdminModuleList { + if x != nil { + return x.AdminModules + } + return nil +} + +// 创建管理员 +type CreateAdminRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` + Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` + Fullname string `protobuf:"bytes,3,opt,name=fullname,proto3" json:"fullname,omitempty"` + ModulesJSON []byte `protobuf:"bytes,4,opt,name=modulesJSON,proto3" json:"modulesJSON,omitempty"` + IsSuper bool `protobuf:"varint,5,opt,name=isSuper,proto3" json:"isSuper,omitempty"` +} + +func (x *CreateAdminRequest) Reset() { + *x = CreateAdminRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_service_admin_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateAdminRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateAdminRequest) ProtoMessage() {} + +func (x *CreateAdminRequest) ProtoReflect() protoreflect.Message { + mi := &file_service_admin_proto_msgTypes[16] + 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 CreateAdminRequest.ProtoReflect.Descriptor instead. +func (*CreateAdminRequest) Descriptor() ([]byte, []int) { + return file_service_admin_proto_rawDescGZIP(), []int{16} +} + +func (x *CreateAdminRequest) GetUsername() string { + if x != nil { + return x.Username + } + return "" +} + +func (x *CreateAdminRequest) GetPassword() string { + if x != nil { + return x.Password + } + return "" +} + +func (x *CreateAdminRequest) GetFullname() string { + if x != nil { + return x.Fullname + } + return "" +} + +func (x *CreateAdminRequest) GetModulesJSON() []byte { + if x != nil { + return x.ModulesJSON + } + return nil +} + +func (x *CreateAdminRequest) GetIsSuper() bool { + if x != nil { + return x.IsSuper + } + return false +} + +type CreateAdminResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + AdminId int64 `protobuf:"varint,1,opt,name=adminId,proto3" json:"adminId,omitempty"` +} + +func (x *CreateAdminResponse) Reset() { + *x = CreateAdminResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_service_admin_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateAdminResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateAdminResponse) ProtoMessage() {} + +func (x *CreateAdminResponse) ProtoReflect() protoreflect.Message { + mi := &file_service_admin_proto_msgTypes[17] + 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 CreateAdminResponse.ProtoReflect.Descriptor instead. +func (*CreateAdminResponse) Descriptor() ([]byte, []int) { + return file_service_admin_proto_rawDescGZIP(), []int{17} +} + +func (x *CreateAdminResponse) GetAdminId() int64 { + if x != nil { + return x.AdminId + } + return 0 +} + +// 修改管理员 +type UpdateAdminRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + AdminId int64 `protobuf:"varint,1,opt,name=adminId,proto3" json:"adminId,omitempty"` + Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"` + Password string `protobuf:"bytes,3,opt,name=password,proto3" json:"password,omitempty"` + Fullname string `protobuf:"bytes,4,opt,name=fullname,proto3" json:"fullname,omitempty"` + ModulesJSON []byte `protobuf:"bytes,5,opt,name=modulesJSON,proto3" json:"modulesJSON,omitempty"` + IsSuper bool `protobuf:"varint,6,opt,name=isSuper,proto3" json:"isSuper,omitempty"` +} + +func (x *UpdateAdminRequest) Reset() { + *x = UpdateAdminRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_service_admin_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateAdminRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateAdminRequest) ProtoMessage() {} + +func (x *UpdateAdminRequest) ProtoReflect() protoreflect.Message { + mi := &file_service_admin_proto_msgTypes[18] + 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 UpdateAdminRequest.ProtoReflect.Descriptor instead. +func (*UpdateAdminRequest) Descriptor() ([]byte, []int) { + return file_service_admin_proto_rawDescGZIP(), []int{18} +} + +func (x *UpdateAdminRequest) GetAdminId() int64 { + if x != nil { + return x.AdminId + } + return 0 +} + +func (x *UpdateAdminRequest) GetUsername() string { + if x != nil { + return x.Username + } + return "" +} + +func (x *UpdateAdminRequest) GetPassword() string { + if x != nil { + return x.Password + } + return "" +} + +func (x *UpdateAdminRequest) GetFullname() string { + if x != nil { + return x.Fullname + } + return "" +} + +func (x *UpdateAdminRequest) GetModulesJSON() []byte { + if x != nil { + return x.ModulesJSON + } + return nil +} + +func (x *UpdateAdminRequest) GetIsSuper() bool { + if x != nil { + return x.IsSuper + } + return false +} + +// 计算管理员数量 +type CountAllEnabledAdminsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *CountAllEnabledAdminsRequest) Reset() { + *x = CountAllEnabledAdminsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_service_admin_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CountAllEnabledAdminsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CountAllEnabledAdminsRequest) ProtoMessage() {} + +func (x *CountAllEnabledAdminsRequest) ProtoReflect() protoreflect.Message { + mi := &file_service_admin_proto_msgTypes[19] + 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 CountAllEnabledAdminsRequest.ProtoReflect.Descriptor instead. +func (*CountAllEnabledAdminsRequest) Descriptor() ([]byte, []int) { + return file_service_admin_proto_rawDescGZIP(), []int{19} +} + +// 列出单页的管理员 +type ListEnabledAdminsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Offset int64 `protobuf:"varint,1,opt,name=offset,proto3" json:"offset,omitempty"` + Size int64 `protobuf:"varint,2,opt,name=size,proto3" json:"size,omitempty"` +} + +func (x *ListEnabledAdminsRequest) Reset() { + *x = ListEnabledAdminsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_service_admin_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListEnabledAdminsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListEnabledAdminsRequest) ProtoMessage() {} + +func (x *ListEnabledAdminsRequest) ProtoReflect() protoreflect.Message { + mi := &file_service_admin_proto_msgTypes[20] + 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 ListEnabledAdminsRequest.ProtoReflect.Descriptor instead. +func (*ListEnabledAdminsRequest) Descriptor() ([]byte, []int) { + return file_service_admin_proto_rawDescGZIP(), []int{20} +} + +func (x *ListEnabledAdminsRequest) GetOffset() int64 { + if x != nil { + return x.Offset + } + return 0 +} + +func (x *ListEnabledAdminsRequest) GetSize() int64 { + if x != nil { + return x.Size + } + return 0 +} + +type ListEnabledAdminsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Admins []*Admin `protobuf:"bytes,1,rep,name=admins,proto3" json:"admins,omitempty"` +} + +func (x *ListEnabledAdminsResponse) Reset() { + *x = ListEnabledAdminsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_service_admin_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListEnabledAdminsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListEnabledAdminsResponse) ProtoMessage() {} + +func (x *ListEnabledAdminsResponse) ProtoReflect() protoreflect.Message { + mi := &file_service_admin_proto_msgTypes[21] + 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 ListEnabledAdminsResponse.ProtoReflect.Descriptor instead. +func (*ListEnabledAdminsResponse) Descriptor() ([]byte, []int) { + return file_service_admin_proto_rawDescGZIP(), []int{21} +} + +func (x *ListEnabledAdminsResponse) GetAdmins() []*Admin { + if x != nil { + return x.Admins + } + return nil +} + +// 删除管理员 +type DeleteAdminRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + AdminId int64 `protobuf:"varint,1,opt,name=adminId,proto3" json:"adminId,omitempty"` +} + +func (x *DeleteAdminRequest) Reset() { + *x = DeleteAdminRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_service_admin_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteAdminRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteAdminRequest) ProtoMessage() {} + +func (x *DeleteAdminRequest) ProtoReflect() protoreflect.Message { + mi := &file_service_admin_proto_msgTypes[22] + 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 DeleteAdminRequest.ProtoReflect.Descriptor instead. +func (*DeleteAdminRequest) Descriptor() ([]byte, []int) { + return file_service_admin_proto_rawDescGZIP(), []int{22} +} + +func (x *DeleteAdminRequest) GetAdminId() int64 { + if x != nil { + return x.AdminId + } + return 0 +} + var File_service_admin_proto protoreflect.FileDescriptor var file_service_admin_proto_rawDesc = []byte{ 0x0a, 0x13, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x1a, 0x11, 0x6d, 0x6f, 0x64, 0x65, 0x6c, - 0x5f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x12, 0x72, 0x70, - 0x63, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x22, 0x4b, 0x0a, 0x11, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x52, 0x65, + 0x5f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x16, 0x6d, 0x6f, + 0x64, 0x65, 0x6c, 0x5f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x12, 0x72, 0x70, 0x63, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x4b, 0x0a, 0x11, 0x4c, 0x6f, 0x67, 0x69, + 0x6e, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, + 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, + 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, + 0x73, 0x77, 0x6f, 0x72, 0x64, 0x22, 0x5c, 0x0a, 0x12, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x41, 0x64, + 0x6d, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x61, + 0x64, 0x6d, 0x69, 0x6e, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x61, 0x64, + 0x6d, 0x69, 0x6e, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x73, 0x4f, 0x6b, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x04, 0x69, 0x73, 0x4f, 0x6b, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x22, 0x33, 0x0a, 0x17, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x41, 0x64, 0x6d, 0x69, + 0x6e, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, + 0x0a, 0x07, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x07, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x49, 0x64, 0x22, 0x48, 0x0a, 0x18, 0x43, 0x68, 0x65, 0x63, + 0x6b, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x73, 0x4f, 0x6b, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x04, 0x69, 0x73, 0x4f, 0x6b, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x22, 0x51, 0x0a, 0x19, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x41, 0x64, 0x6d, 0x69, 0x6e, + 0x55, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x18, 0x0a, 0x07, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x07, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, + 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, + 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x34, 0x0a, 0x1a, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x41, 0x64, + 0x6d, 0x69, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x78, 0x69, 0x73, 0x74, 0x73, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x06, 0x65, 0x78, 0x69, 0x73, 0x74, 0x73, 0x22, 0x34, 0x0a, 0x18, 0x46, + 0x69, 0x6e, 0x64, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x46, 0x75, 0x6c, 0x6c, 0x6e, 0x61, 0x6d, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x6d, 0x69, 0x6e, + 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x49, + 0x64, 0x22, 0x37, 0x0a, 0x19, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x46, 0x75, + 0x6c, 0x6c, 0x6e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1a, + 0x0a, 0x08, 0x66, 0x75, 0x6c, 0x6c, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x08, 0x66, 0x75, 0x6c, 0x6c, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x33, 0x0a, 0x17, 0x46, 0x69, + 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x49, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x49, 0x64, 0x22, + 0x3b, 0x0a, 0x18, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x41, 0x64, + 0x6d, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1f, 0x0a, 0x05, 0x61, + 0x64, 0x6d, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x70, 0x62, 0x2e, + 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x52, 0x05, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x22, 0x54, 0x0a, 0x1a, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x64, + 0x6d, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, + 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, + 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, + 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, + 0x72, 0x64, 0x22, 0x37, 0x0a, 0x1b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x07, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x49, 0x64, 0x22, 0x4e, 0x0a, 0x16, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x49, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x49, 0x64, 0x12, + 0x1a, 0x0a, 0x08, 0x66, 0x75, 0x6c, 0x6c, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x08, 0x66, 0x75, 0x6c, 0x6c, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x6b, 0x0a, 0x17, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x49, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x49, 0x64, + 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, + 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, + 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x22, 0x1c, 0x0a, 0x1a, 0x46, 0x69, 0x6e, 0x64, + 0x41, 0x6c, 0x6c, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x56, 0x0a, 0x1b, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6c, + 0x6c, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x0c, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x4d, 0x6f, + 0x64, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x70, 0x62, + 0x2e, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x4c, 0x69, 0x73, 0x74, + 0x52, 0x0c, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x22, 0xa4, + 0x01, 0x0a, 0x12, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x22, 0x5c, 0x0a, - 0x12, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x49, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x49, 0x64, 0x12, 0x12, 0x0a, - 0x04, 0x69, 0x73, 0x4f, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x69, 0x73, 0x4f, - 0x6b, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x33, 0x0a, 0x17, 0x43, - 0x68, 0x65, 0x63, 0x6b, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x49, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x49, 0x64, - 0x22, 0x48, 0x0a, 0x18, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x45, 0x78, - 0x69, 0x73, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, - 0x69, 0x73, 0x4f, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x69, 0x73, 0x4f, 0x6b, - 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x51, 0x0a, 0x19, 0x43, 0x68, - 0x65, 0x63, 0x6b, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x6d, 0x69, 0x6e, - 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x49, - 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x34, 0x0a, - 0x1a, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x6e, - 0x61, 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x65, - 0x78, 0x69, 0x73, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x65, 0x78, 0x69, - 0x73, 0x74, 0x73, 0x22, 0x34, 0x0a, 0x18, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x64, 0x6d, 0x69, 0x6e, - 0x46, 0x75, 0x6c, 0x6c, 0x6e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x18, 0x0a, 0x07, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x07, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x49, 0x64, 0x22, 0x37, 0x0a, 0x19, 0x46, 0x69, 0x6e, - 0x64, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x46, 0x75, 0x6c, 0x6c, 0x6e, 0x61, 0x6d, 0x65, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x75, 0x6c, 0x6c, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x75, 0x6c, 0x6c, 0x6e, 0x61, - 0x6d, 0x65, 0x22, 0x33, 0x0a, 0x17, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, - 0x64, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, + 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x1a, 0x0a, + 0x08, 0x66, 0x75, 0x6c, 0x6c, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x08, 0x66, 0x75, 0x6c, 0x6c, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x6d, 0x6f, 0x64, + 0x75, 0x6c, 0x65, 0x73, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, + 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x4a, 0x53, 0x4f, 0x4e, 0x12, 0x18, 0x0a, 0x07, 0x69, + 0x73, 0x53, 0x75, 0x70, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x69, 0x73, + 0x53, 0x75, 0x70, 0x65, 0x72, 0x22, 0x2f, 0x0a, 0x13, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, + 0x64, 0x6d, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, + 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x61, + 0x64, 0x6d, 0x69, 0x6e, 0x49, 0x64, 0x22, 0xbe, 0x01, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, - 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x49, 0x64, 0x22, 0x3b, 0x0a, 0x18, 0x46, 0x69, 0x6e, 0x64, 0x45, - 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x1f, 0x0a, 0x05, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x70, 0x62, 0x2e, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x52, 0x05, 0x61, - 0x64, 0x6d, 0x69, 0x6e, 0x22, 0x54, 0x0a, 0x1a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x72, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, - 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x22, 0x37, 0x0a, 0x1b, 0x43, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x64, 0x6d, 0x69, - 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x6d, - 0x69, 0x6e, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x61, 0x64, 0x6d, 0x69, - 0x6e, 0x49, 0x64, 0x22, 0x4a, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x64, 0x6d, - 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x6d, - 0x69, 0x6e, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x61, 0x64, 0x6d, 0x69, - 0x6e, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x75, 0x6c, 0x6c, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x75, 0x6c, 0x6c, 0x6e, 0x61, 0x6d, 0x65, 0x22, - 0x6b, 0x0a, 0x17, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x4c, 0x6f, - 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, - 0x6d, 0x69, 0x6e, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x61, 0x64, 0x6d, - 0x69, 0x6e, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, - 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x32, 0xe0, 0x04, 0x0a, - 0x0c, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x3b, 0x0a, - 0x0a, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x12, 0x15, 0x2e, 0x70, 0x62, - 0x2e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x70, 0x62, 0x2e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x41, 0x64, 0x6d, - 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4d, 0x0a, 0x10, 0x63, 0x68, - 0x65, 0x63, 0x6b, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x12, 0x1b, + 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, + 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, + 0x1a, 0x0a, 0x08, 0x66, 0x75, 0x6c, 0x6c, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x08, 0x66, 0x75, 0x6c, 0x6c, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x6d, + 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, + 0x52, 0x0b, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x4a, 0x53, 0x4f, 0x4e, 0x12, 0x18, 0x0a, + 0x07, 0x69, 0x73, 0x53, 0x75, 0x70, 0x65, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, + 0x69, 0x73, 0x53, 0x75, 0x70, 0x65, 0x72, 0x22, 0x1e, 0x0a, 0x1c, 0x43, 0x6f, 0x75, 0x6e, 0x74, + 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x46, 0x0a, 0x18, 0x4c, 0x69, 0x73, 0x74, 0x45, + 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x41, 0x64, 0x6d, 0x69, 0x6e, 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, + 0x3e, 0x0a, 0x19, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x41, 0x64, + 0x6d, 0x69, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x21, 0x0a, 0x06, + 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x70, + 0x62, 0x2e, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x52, 0x06, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x73, 0x22, + 0x2e, 0x0a, 0x12, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x49, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x49, 0x64, 0x32, + 0x91, 0x08, 0x0a, 0x0c, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x12, 0x3b, 0x0a, 0x0a, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x12, 0x15, + 0x2e, 0x70, 0x62, 0x2e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x70, 0x62, 0x2e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, + 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4d, 0x0a, + 0x10, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x45, 0x78, 0x69, 0x73, 0x74, + 0x73, 0x12, 0x1b, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x41, 0x64, 0x6d, 0x69, + 0x6e, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x45, 0x78, - 0x69, 0x73, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x70, 0x62, - 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x45, 0x78, 0x69, 0x73, 0x74, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x53, 0x0a, 0x12, 0x63, 0x68, 0x65, - 0x63, 0x6b, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, - 0x1d, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x55, - 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, - 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x55, 0x73, - 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x50, - 0x0a, 0x11, 0x66, 0x69, 0x6e, 0x64, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x46, 0x75, 0x6c, 0x6c, 0x6e, - 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x64, 0x6d, - 0x69, 0x6e, 0x46, 0x75, 0x6c, 0x6c, 0x6e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x1d, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x64, 0x6d, 0x69, 0x6e, - 0x46, 0x75, 0x6c, 0x6c, 0x6e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x4d, 0x0a, 0x10, 0x66, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x41, - 0x64, 0x6d, 0x69, 0x6e, 0x12, 0x1b, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, - 0x61, 0x62, 0x6c, 0x65, 0x64, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x1c, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, - 0x65, 0x64, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x56, 0x0a, 0x13, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x55, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x12, 0x1e, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x4f, 0x72, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x4f, 0x72, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x12, 0x16, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, - 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x3f, - 0x0a, 0x10, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x4c, 0x6f, 0x67, - 0x69, 0x6e, 0x12, 0x1b, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x64, - 0x6d, 0x69, 0x6e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x42, - 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x69, 0x73, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x53, 0x0a, 0x12, + 0x63, 0x68, 0x65, 0x63, 0x6b, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x6e, 0x61, + 0x6d, 0x65, 0x12, 0x1d, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x41, 0x64, 0x6d, + 0x69, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x1e, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x41, 0x64, 0x6d, 0x69, + 0x6e, 0x55, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x50, 0x0a, 0x11, 0x66, 0x69, 0x6e, 0x64, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x46, 0x75, + 0x6c, 0x6c, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, + 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x46, 0x75, 0x6c, 0x6c, 0x6e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x64, + 0x6d, 0x69, 0x6e, 0x46, 0x75, 0x6c, 0x6c, 0x6e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x4d, 0x0a, 0x10, 0x66, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, + 0x65, 0x64, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x12, 0x1b, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, + 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, + 0x61, 0x62, 0x6c, 0x65, 0x64, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x56, 0x0a, 0x13, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x12, 0x1e, 0x2e, 0x70, 0x62, 0x2e, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x64, 0x6d, + 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x70, 0x62, 0x2e, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x64, 0x6d, + 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3d, 0x0a, 0x0f, 0x75, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1a, 0x2e, + 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x49, 0x6e, + 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, + 0x50, 0x43, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x3f, 0x0a, 0x10, 0x75, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x1b, 0x2e, + 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x4c, 0x6f, + 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x70, 0x62, 0x2e, + 0x52, 0x50, 0x43, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x56, 0x0a, 0x13, 0x66, 0x69, + 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, + 0x73, 0x12, 0x1e, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x41, 0x64, + 0x6d, 0x69, 0x6e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x1f, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x41, 0x64, + 0x6d, 0x69, 0x6e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x3e, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x64, 0x6d, 0x69, + 0x6e, 0x12, 0x16, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x64, 0x6d, + 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x70, 0x62, 0x2e, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x35, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x64, 0x6d, 0x69, + 0x6e, 0x12, 0x16, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x64, 0x6d, + 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, + 0x50, 0x43, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x4f, 0x0a, 0x15, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x41, 0x64, 0x6d, 0x69, + 0x6e, 0x73, 0x12, 0x20, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x6c, 0x6c, + 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x43, 0x6f, 0x75, + 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x50, 0x0a, 0x11, 0x6c, 0x69, + 0x73, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x73, 0x12, + 0x1c, 0x2e, 0x70, 0x62, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, + 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, + 0x70, 0x62, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x41, 0x64, + 0x6d, 0x69, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x0b, + 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x12, 0x16, 0x2e, 0x70, 0x62, + 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x53, 0x75, 0x63, 0x63, + 0x65, 0x73, 0x73, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, } var ( @@ -889,48 +1456,73 @@ func file_service_admin_proto_rawDescGZIP() []byte { return file_service_admin_proto_rawDescData } -var file_service_admin_proto_msgTypes = make([]protoimpl.MessageInfo, 14) +var file_service_admin_proto_msgTypes = make([]protoimpl.MessageInfo, 23) var file_service_admin_proto_goTypes = []interface{}{ - (*LoginAdminRequest)(nil), // 0: pb.LoginAdminRequest - (*LoginAdminResponse)(nil), // 1: pb.LoginAdminResponse - (*CheckAdminExistsRequest)(nil), // 2: pb.CheckAdminExistsRequest - (*CheckAdminExistsResponse)(nil), // 3: pb.CheckAdminExistsResponse - (*CheckAdminUsernameRequest)(nil), // 4: pb.CheckAdminUsernameRequest - (*CheckAdminUsernameResponse)(nil), // 5: pb.CheckAdminUsernameResponse - (*FindAdminFullnameRequest)(nil), // 6: pb.FindAdminFullnameRequest - (*FindAdminFullnameResponse)(nil), // 7: pb.FindAdminFullnameResponse - (*FindEnabledAdminRequest)(nil), // 8: pb.FindEnabledAdminRequest - (*FindEnabledAdminResponse)(nil), // 9: pb.FindEnabledAdminResponse - (*CreateOrUpdateAdminRequest)(nil), // 10: pb.CreateOrUpdateAdminRequest - (*CreateOrUpdateAdminResponse)(nil), // 11: pb.CreateOrUpdateAdminResponse - (*UpdateAdminRequest)(nil), // 12: pb.UpdateAdminRequest - (*UpdateAdminLoginRequest)(nil), // 13: pb.UpdateAdminLoginRequest - (*Admin)(nil), // 14: pb.Admin - (*RPCSuccess)(nil), // 15: pb.RPCSuccess + (*LoginAdminRequest)(nil), // 0: pb.LoginAdminRequest + (*LoginAdminResponse)(nil), // 1: pb.LoginAdminResponse + (*CheckAdminExistsRequest)(nil), // 2: pb.CheckAdminExistsRequest + (*CheckAdminExistsResponse)(nil), // 3: pb.CheckAdminExistsResponse + (*CheckAdminUsernameRequest)(nil), // 4: pb.CheckAdminUsernameRequest + (*CheckAdminUsernameResponse)(nil), // 5: pb.CheckAdminUsernameResponse + (*FindAdminFullnameRequest)(nil), // 6: pb.FindAdminFullnameRequest + (*FindAdminFullnameResponse)(nil), // 7: pb.FindAdminFullnameResponse + (*FindEnabledAdminRequest)(nil), // 8: pb.FindEnabledAdminRequest + (*FindEnabledAdminResponse)(nil), // 9: pb.FindEnabledAdminResponse + (*CreateOrUpdateAdminRequest)(nil), // 10: pb.CreateOrUpdateAdminRequest + (*CreateOrUpdateAdminResponse)(nil), // 11: pb.CreateOrUpdateAdminResponse + (*UpdateAdminInfoRequest)(nil), // 12: pb.UpdateAdminInfoRequest + (*UpdateAdminLoginRequest)(nil), // 13: pb.UpdateAdminLoginRequest + (*FindAllAdminModulesRequest)(nil), // 14: pb.FindAllAdminModulesRequest + (*FindAllAdminModulesResponse)(nil), // 15: pb.FindAllAdminModulesResponse + (*CreateAdminRequest)(nil), // 16: pb.CreateAdminRequest + (*CreateAdminResponse)(nil), // 17: pb.CreateAdminResponse + (*UpdateAdminRequest)(nil), // 18: pb.UpdateAdminRequest + (*CountAllEnabledAdminsRequest)(nil), // 19: pb.CountAllEnabledAdminsRequest + (*ListEnabledAdminsRequest)(nil), // 20: pb.ListEnabledAdminsRequest + (*ListEnabledAdminsResponse)(nil), // 21: pb.ListEnabledAdminsResponse + (*DeleteAdminRequest)(nil), // 22: pb.DeleteAdminRequest + (*Admin)(nil), // 23: pb.Admin + (*AdminModuleList)(nil), // 24: pb.AdminModuleList + (*RPCSuccess)(nil), // 25: pb.RPCSuccess + (*RPCCountResponse)(nil), // 26: pb.RPCCountResponse } var file_service_admin_proto_depIdxs = []int32{ - 14, // 0: pb.FindEnabledAdminResponse.admin:type_name -> pb.Admin - 0, // 1: pb.AdminService.loginAdmin:input_type -> pb.LoginAdminRequest - 2, // 2: pb.AdminService.checkAdminExists:input_type -> pb.CheckAdminExistsRequest - 4, // 3: pb.AdminService.checkAdminUsername:input_type -> pb.CheckAdminUsernameRequest - 6, // 4: pb.AdminService.findAdminFullname:input_type -> pb.FindAdminFullnameRequest - 8, // 5: pb.AdminService.findEnabledAdmin:input_type -> pb.FindEnabledAdminRequest - 10, // 6: pb.AdminService.createOrUpdateAdmin:input_type -> pb.CreateOrUpdateAdminRequest - 12, // 7: pb.AdminService.updateAdmin:input_type -> pb.UpdateAdminRequest - 13, // 8: pb.AdminService.updateAdminLogin:input_type -> pb.UpdateAdminLoginRequest - 1, // 9: pb.AdminService.loginAdmin:output_type -> pb.LoginAdminResponse - 3, // 10: pb.AdminService.checkAdminExists:output_type -> pb.CheckAdminExistsResponse - 5, // 11: pb.AdminService.checkAdminUsername:output_type -> pb.CheckAdminUsernameResponse - 7, // 12: pb.AdminService.findAdminFullname:output_type -> pb.FindAdminFullnameResponse - 9, // 13: pb.AdminService.findEnabledAdmin:output_type -> pb.FindEnabledAdminResponse - 11, // 14: pb.AdminService.createOrUpdateAdmin:output_type -> pb.CreateOrUpdateAdminResponse - 15, // 15: pb.AdminService.updateAdmin:output_type -> pb.RPCSuccess - 15, // 16: pb.AdminService.updateAdminLogin:output_type -> pb.RPCSuccess - 9, // [9:17] is the sub-list for method output_type - 1, // [1:9] 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 + 23, // 0: pb.FindEnabledAdminResponse.admin:type_name -> pb.Admin + 24, // 1: pb.FindAllAdminModulesResponse.adminModules:type_name -> pb.AdminModuleList + 23, // 2: pb.ListEnabledAdminsResponse.admins:type_name -> pb.Admin + 0, // 3: pb.AdminService.loginAdmin:input_type -> pb.LoginAdminRequest + 2, // 4: pb.AdminService.checkAdminExists:input_type -> pb.CheckAdminExistsRequest + 4, // 5: pb.AdminService.checkAdminUsername:input_type -> pb.CheckAdminUsernameRequest + 6, // 6: pb.AdminService.findAdminFullname:input_type -> pb.FindAdminFullnameRequest + 8, // 7: pb.AdminService.findEnabledAdmin:input_type -> pb.FindEnabledAdminRequest + 10, // 8: pb.AdminService.createOrUpdateAdmin:input_type -> pb.CreateOrUpdateAdminRequest + 12, // 9: pb.AdminService.updateAdminInfo:input_type -> pb.UpdateAdminInfoRequest + 13, // 10: pb.AdminService.updateAdminLogin:input_type -> pb.UpdateAdminLoginRequest + 14, // 11: pb.AdminService.findAllAdminModules:input_type -> pb.FindAllAdminModulesRequest + 16, // 12: pb.AdminService.createAdmin:input_type -> pb.CreateAdminRequest + 18, // 13: pb.AdminService.updateAdmin:input_type -> pb.UpdateAdminRequest + 19, // 14: pb.AdminService.countAllEnabledAdmins:input_type -> pb.CountAllEnabledAdminsRequest + 20, // 15: pb.AdminService.listEnabledAdmins:input_type -> pb.ListEnabledAdminsRequest + 22, // 16: pb.AdminService.deleteAdmin:input_type -> pb.DeleteAdminRequest + 1, // 17: pb.AdminService.loginAdmin:output_type -> pb.LoginAdminResponse + 3, // 18: pb.AdminService.checkAdminExists:output_type -> pb.CheckAdminExistsResponse + 5, // 19: pb.AdminService.checkAdminUsername:output_type -> pb.CheckAdminUsernameResponse + 7, // 20: pb.AdminService.findAdminFullname:output_type -> pb.FindAdminFullnameResponse + 9, // 21: pb.AdminService.findEnabledAdmin:output_type -> pb.FindEnabledAdminResponse + 11, // 22: pb.AdminService.createOrUpdateAdmin:output_type -> pb.CreateOrUpdateAdminResponse + 25, // 23: pb.AdminService.updateAdminInfo:output_type -> pb.RPCSuccess + 25, // 24: pb.AdminService.updateAdminLogin:output_type -> pb.RPCSuccess + 15, // 25: pb.AdminService.findAllAdminModules:output_type -> pb.FindAllAdminModulesResponse + 17, // 26: pb.AdminService.createAdmin:output_type -> pb.CreateAdminResponse + 25, // 27: pb.AdminService.updateAdmin:output_type -> pb.RPCSuccess + 26, // 28: pb.AdminService.countAllEnabledAdmins:output_type -> pb.RPCCountResponse + 21, // 29: pb.AdminService.listEnabledAdmins:output_type -> pb.ListEnabledAdminsResponse + 25, // 30: pb.AdminService.deleteAdmin:output_type -> pb.RPCSuccess + 17, // [17:31] is the sub-list for method output_type + 3, // [3:17] 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_admin_proto_init() } @@ -939,6 +1531,7 @@ func file_service_admin_proto_init() { return } file_model_admin_proto_init() + file_model_admin_list_proto_init() file_rpc_messages_proto_init() if !protoimpl.UnsafeEnabled { file_service_admin_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { @@ -1086,7 +1679,7 @@ func file_service_admin_proto_init() { } } file_service_admin_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateAdminRequest); i { + switch v := v.(*UpdateAdminInfoRequest); i { case 0: return &v.state case 1: @@ -1109,6 +1702,114 @@ func file_service_admin_proto_init() { return nil } } + file_service_admin_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FindAllAdminModulesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_admin_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FindAllAdminModulesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_admin_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateAdminRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_admin_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateAdminResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_admin_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateAdminRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_admin_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CountAllEnabledAdminsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_admin_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListEnabledAdminsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_admin_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListEnabledAdminsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_admin_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteAdminRequest); 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{ @@ -1116,7 +1817,7 @@ func file_service_admin_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_service_admin_proto_rawDesc, NumEnums: 0, - NumMessages: 14, + NumMessages: 23, NumExtensions: 0, NumServices: 1, }, @@ -1155,9 +1856,21 @@ type AdminServiceClient interface { // 创建或修改管理员 CreateOrUpdateAdmin(ctx context.Context, in *CreateOrUpdateAdminRequest, opts ...grpc.CallOption) (*CreateOrUpdateAdminResponse, error) // 修改管理员信息 - UpdateAdmin(ctx context.Context, in *UpdateAdminRequest, opts ...grpc.CallOption) (*RPCSuccess, error) + UpdateAdminInfo(ctx context.Context, in *UpdateAdminInfoRequest, opts ...grpc.CallOption) (*RPCSuccess, error) // 修改管理员登录信息 UpdateAdminLogin(ctx context.Context, in *UpdateAdminLoginRequest, opts ...grpc.CallOption) (*RPCSuccess, error) + // 获取所有管理员的权限列表 + FindAllAdminModules(ctx context.Context, in *FindAllAdminModulesRequest, opts ...grpc.CallOption) (*FindAllAdminModulesResponse, error) + // 创建管理员 + CreateAdmin(ctx context.Context, in *CreateAdminRequest, opts ...grpc.CallOption) (*CreateAdminResponse, error) + // 修改管理员 + UpdateAdmin(ctx context.Context, in *UpdateAdminRequest, opts ...grpc.CallOption) (*RPCSuccess, error) + // 计算管理员数量 + CountAllEnabledAdmins(ctx context.Context, in *CountAllEnabledAdminsRequest, opts ...grpc.CallOption) (*RPCCountResponse, error) + // 列出单页的管理员 + ListEnabledAdmins(ctx context.Context, in *ListEnabledAdminsRequest, opts ...grpc.CallOption) (*ListEnabledAdminsResponse, error) + // 删除管理员 + DeleteAdmin(ctx context.Context, in *DeleteAdminRequest, opts ...grpc.CallOption) (*RPCSuccess, error) } type adminServiceClient struct { @@ -1222,9 +1935,9 @@ func (c *adminServiceClient) CreateOrUpdateAdmin(ctx context.Context, in *Create return out, nil } -func (c *adminServiceClient) UpdateAdmin(ctx context.Context, in *UpdateAdminRequest, opts ...grpc.CallOption) (*RPCSuccess, error) { +func (c *adminServiceClient) UpdateAdminInfo(ctx context.Context, in *UpdateAdminInfoRequest, opts ...grpc.CallOption) (*RPCSuccess, error) { out := new(RPCSuccess) - err := c.cc.Invoke(ctx, "/pb.AdminService/updateAdmin", in, out, opts...) + err := c.cc.Invoke(ctx, "/pb.AdminService/updateAdminInfo", in, out, opts...) if err != nil { return nil, err } @@ -1240,6 +1953,60 @@ func (c *adminServiceClient) UpdateAdminLogin(ctx context.Context, in *UpdateAdm return out, nil } +func (c *adminServiceClient) FindAllAdminModules(ctx context.Context, in *FindAllAdminModulesRequest, opts ...grpc.CallOption) (*FindAllAdminModulesResponse, error) { + out := new(FindAllAdminModulesResponse) + err := c.cc.Invoke(ctx, "/pb.AdminService/findAllAdminModules", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *adminServiceClient) CreateAdmin(ctx context.Context, in *CreateAdminRequest, opts ...grpc.CallOption) (*CreateAdminResponse, error) { + out := new(CreateAdminResponse) + err := c.cc.Invoke(ctx, "/pb.AdminService/createAdmin", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *adminServiceClient) UpdateAdmin(ctx context.Context, in *UpdateAdminRequest, opts ...grpc.CallOption) (*RPCSuccess, error) { + out := new(RPCSuccess) + err := c.cc.Invoke(ctx, "/pb.AdminService/updateAdmin", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *adminServiceClient) CountAllEnabledAdmins(ctx context.Context, in *CountAllEnabledAdminsRequest, opts ...grpc.CallOption) (*RPCCountResponse, error) { + out := new(RPCCountResponse) + err := c.cc.Invoke(ctx, "/pb.AdminService/countAllEnabledAdmins", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *adminServiceClient) ListEnabledAdmins(ctx context.Context, in *ListEnabledAdminsRequest, opts ...grpc.CallOption) (*ListEnabledAdminsResponse, error) { + out := new(ListEnabledAdminsResponse) + err := c.cc.Invoke(ctx, "/pb.AdminService/listEnabledAdmins", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *adminServiceClient) DeleteAdmin(ctx context.Context, in *DeleteAdminRequest, opts ...grpc.CallOption) (*RPCSuccess, error) { + out := new(RPCSuccess) + err := c.cc.Invoke(ctx, "/pb.AdminService/deleteAdmin", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // AdminServiceServer is the server API for AdminService service. type AdminServiceServer interface { // 登录 @@ -1255,9 +2022,21 @@ type AdminServiceServer interface { // 创建或修改管理员 CreateOrUpdateAdmin(context.Context, *CreateOrUpdateAdminRequest) (*CreateOrUpdateAdminResponse, error) // 修改管理员信息 - UpdateAdmin(context.Context, *UpdateAdminRequest) (*RPCSuccess, error) + UpdateAdminInfo(context.Context, *UpdateAdminInfoRequest) (*RPCSuccess, error) // 修改管理员登录信息 UpdateAdminLogin(context.Context, *UpdateAdminLoginRequest) (*RPCSuccess, error) + // 获取所有管理员的权限列表 + FindAllAdminModules(context.Context, *FindAllAdminModulesRequest) (*FindAllAdminModulesResponse, error) + // 创建管理员 + CreateAdmin(context.Context, *CreateAdminRequest) (*CreateAdminResponse, error) + // 修改管理员 + UpdateAdmin(context.Context, *UpdateAdminRequest) (*RPCSuccess, error) + // 计算管理员数量 + CountAllEnabledAdmins(context.Context, *CountAllEnabledAdminsRequest) (*RPCCountResponse, error) + // 列出单页的管理员 + ListEnabledAdmins(context.Context, *ListEnabledAdminsRequest) (*ListEnabledAdminsResponse, error) + // 删除管理员 + DeleteAdmin(context.Context, *DeleteAdminRequest) (*RPCSuccess, error) } // UnimplementedAdminServiceServer can be embedded to have forward compatible implementations. @@ -1282,12 +2061,30 @@ func (*UnimplementedAdminServiceServer) FindEnabledAdmin(context.Context, *FindE func (*UnimplementedAdminServiceServer) CreateOrUpdateAdmin(context.Context, *CreateOrUpdateAdminRequest) (*CreateOrUpdateAdminResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CreateOrUpdateAdmin not implemented") } -func (*UnimplementedAdminServiceServer) UpdateAdmin(context.Context, *UpdateAdminRequest) (*RPCSuccess, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateAdmin not implemented") +func (*UnimplementedAdminServiceServer) UpdateAdminInfo(context.Context, *UpdateAdminInfoRequest) (*RPCSuccess, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateAdminInfo not implemented") } func (*UnimplementedAdminServiceServer) UpdateAdminLogin(context.Context, *UpdateAdminLoginRequest) (*RPCSuccess, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateAdminLogin not implemented") } +func (*UnimplementedAdminServiceServer) FindAllAdminModules(context.Context, *FindAllAdminModulesRequest) (*FindAllAdminModulesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method FindAllAdminModules not implemented") +} +func (*UnimplementedAdminServiceServer) CreateAdmin(context.Context, *CreateAdminRequest) (*CreateAdminResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateAdmin not implemented") +} +func (*UnimplementedAdminServiceServer) UpdateAdmin(context.Context, *UpdateAdminRequest) (*RPCSuccess, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateAdmin not implemented") +} +func (*UnimplementedAdminServiceServer) CountAllEnabledAdmins(context.Context, *CountAllEnabledAdminsRequest) (*RPCCountResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CountAllEnabledAdmins not implemented") +} +func (*UnimplementedAdminServiceServer) ListEnabledAdmins(context.Context, *ListEnabledAdminsRequest) (*ListEnabledAdminsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListEnabledAdmins not implemented") +} +func (*UnimplementedAdminServiceServer) DeleteAdmin(context.Context, *DeleteAdminRequest) (*RPCSuccess, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteAdmin not implemented") +} func RegisterAdminServiceServer(s *grpc.Server, srv AdminServiceServer) { s.RegisterService(&_AdminService_serviceDesc, srv) @@ -1401,20 +2198,20 @@ func _AdminService_CreateOrUpdateAdmin_Handler(srv interface{}, ctx context.Cont return interceptor(ctx, in, info, handler) } -func _AdminService_UpdateAdmin_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UpdateAdminRequest) +func _AdminService_UpdateAdminInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateAdminInfoRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(AdminServiceServer).UpdateAdmin(ctx, in) + return srv.(AdminServiceServer).UpdateAdminInfo(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/pb.AdminService/UpdateAdmin", + FullMethod: "/pb.AdminService/UpdateAdminInfo", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AdminServiceServer).UpdateAdmin(ctx, req.(*UpdateAdminRequest)) + return srv.(AdminServiceServer).UpdateAdminInfo(ctx, req.(*UpdateAdminInfoRequest)) } return interceptor(ctx, in, info, handler) } @@ -1437,6 +2234,114 @@ func _AdminService_UpdateAdminLogin_Handler(srv interface{}, ctx context.Context return interceptor(ctx, in, info, handler) } +func _AdminService_FindAllAdminModules_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(FindAllAdminModulesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AdminServiceServer).FindAllAdminModules(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.AdminService/FindAllAdminModules", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AdminServiceServer).FindAllAdminModules(ctx, req.(*FindAllAdminModulesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AdminService_CreateAdmin_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateAdminRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AdminServiceServer).CreateAdmin(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.AdminService/CreateAdmin", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AdminServiceServer).CreateAdmin(ctx, req.(*CreateAdminRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AdminService_UpdateAdmin_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateAdminRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AdminServiceServer).UpdateAdmin(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.AdminService/UpdateAdmin", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AdminServiceServer).UpdateAdmin(ctx, req.(*UpdateAdminRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AdminService_CountAllEnabledAdmins_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CountAllEnabledAdminsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AdminServiceServer).CountAllEnabledAdmins(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.AdminService/CountAllEnabledAdmins", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AdminServiceServer).CountAllEnabledAdmins(ctx, req.(*CountAllEnabledAdminsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AdminService_ListEnabledAdmins_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListEnabledAdminsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AdminServiceServer).ListEnabledAdmins(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.AdminService/ListEnabledAdmins", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AdminServiceServer).ListEnabledAdmins(ctx, req.(*ListEnabledAdminsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AdminService_DeleteAdmin_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteAdminRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AdminServiceServer).DeleteAdmin(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.AdminService/DeleteAdmin", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AdminServiceServer).DeleteAdmin(ctx, req.(*DeleteAdminRequest)) + } + return interceptor(ctx, in, info, handler) +} + var _AdminService_serviceDesc = grpc.ServiceDesc{ ServiceName: "pb.AdminService", HandlerType: (*AdminServiceServer)(nil), @@ -1466,13 +2371,37 @@ var _AdminService_serviceDesc = grpc.ServiceDesc{ Handler: _AdminService_CreateOrUpdateAdmin_Handler, }, { - MethodName: "updateAdmin", - Handler: _AdminService_UpdateAdmin_Handler, + MethodName: "updateAdminInfo", + Handler: _AdminService_UpdateAdminInfo_Handler, }, { MethodName: "updateAdminLogin", Handler: _AdminService_UpdateAdminLogin_Handler, }, + { + MethodName: "findAllAdminModules", + Handler: _AdminService_FindAllAdminModules_Handler, + }, + { + MethodName: "createAdmin", + Handler: _AdminService_CreateAdmin_Handler, + }, + { + MethodName: "updateAdmin", + Handler: _AdminService_UpdateAdmin_Handler, + }, + { + MethodName: "countAllEnabledAdmins", + Handler: _AdminService_CountAllEnabledAdmins_Handler, + }, + { + MethodName: "listEnabledAdmins", + Handler: _AdminService_ListEnabledAdmins_Handler, + }, + { + MethodName: "deleteAdmin", + Handler: _AdminService_DeleteAdmin_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "service_admin.proto", diff --git a/pkg/rpc/protos/model_admin.proto b/pkg/rpc/protos/model_admin.proto index 5704b0f..a4c31ab 100644 --- a/pkg/rpc/protos/model_admin.proto +++ b/pkg/rpc/protos/model_admin.proto @@ -3,9 +3,14 @@ option go_package = "./pb"; package pb; +import "model_admin_module.proto"; + message Admin { int64 id = 1; string fullname = 2; string username = 3; bool isOn = 4; + bool isSuper = 5; + int64 createdAt = 6; + repeated AdminModule Modules = 7; } \ No newline at end of file diff --git a/pkg/rpc/protos/model_admin_list.proto b/pkg/rpc/protos/model_admin_list.proto new file mode 100644 index 0000000..236e545 --- /dev/null +++ b/pkg/rpc/protos/model_admin_list.proto @@ -0,0 +1,12 @@ +syntax = "proto3"; +option go_package = "./pb"; + +package pb; + +import "model_admin_module.proto"; + +message AdminModuleList { + int64 adminId = 1; + bool isSuper = 2; + repeated AdminModule Modules = 3; +} \ No newline at end of file diff --git a/pkg/rpc/protos/model_admin_module.proto b/pkg/rpc/protos/model_admin_module.proto new file mode 100644 index 0000000..968d485 --- /dev/null +++ b/pkg/rpc/protos/model_admin_module.proto @@ -0,0 +1,10 @@ +syntax = "proto3"; +option go_package = "./pb"; + +package pb; + +message AdminModule { + bool allowAll = 1; + string code = 2; + repeated string actions = 3; +} diff --git a/pkg/rpc/protos/service_admin.proto b/pkg/rpc/protos/service_admin.proto index b1b64af..575d6b4 100644 --- a/pkg/rpc/protos/service_admin.proto +++ b/pkg/rpc/protos/service_admin.proto @@ -4,6 +4,7 @@ option go_package = "./pb"; package pb; import "model_admin.proto"; +import "model_admin_list.proto"; import "rpc_messages.proto"; service AdminService { @@ -26,10 +27,28 @@ service AdminService { rpc createOrUpdateAdmin (CreateOrUpdateAdminRequest) returns (CreateOrUpdateAdminResponse); // 修改管理员信息 - rpc updateAdmin (UpdateAdminRequest) returns (RPCSuccess); + rpc updateAdminInfo (UpdateAdminInfoRequest) returns (RPCSuccess); // 修改管理员登录信息 rpc updateAdminLogin (UpdateAdminLoginRequest) returns (RPCSuccess); + + // 获取所有管理员的权限列表 + rpc findAllAdminModules (FindAllAdminModulesRequest) returns (FindAllAdminModulesResponse); + + // 创建管理员 + rpc createAdmin (CreateAdminRequest) returns (CreateAdminResponse); + + // 修改管理员 + rpc updateAdmin (UpdateAdminRequest) returns (RPCSuccess); + + // 计算管理员数量 + rpc countAllEnabledAdmins (CountAllEnabledAdminsRequest) returns (RPCCountResponse); + + // 列出单页的管理员 + rpc listEnabledAdmins (ListEnabledAdminsRequest) returns (ListEnabledAdminsResponse); + + // 删除管理员 + rpc deleteAdmin (DeleteAdminRequest) returns (RPCSuccess); } // 登录 @@ -93,7 +112,7 @@ message CreateOrUpdateAdminResponse { } // 修改管理员信息 -message UpdateAdminRequest { +message UpdateAdminInfoRequest { int64 adminId = 1; string fullname = 2; } @@ -103,4 +122,56 @@ message UpdateAdminLoginRequest { int64 adminId = 1; string username = 2; string password = 3; +} + +// 获取管理所有权限列表 +message FindAllAdminModulesRequest { + +} + +message FindAllAdminModulesResponse { + repeated AdminModuleList adminModules = 1; +} + +// 创建管理员 +message CreateAdminRequest { + string username = 1; + string password = 2; + string fullname = 3; + bytes modulesJSON = 4; + bool isSuper = 5; +} + +message CreateAdminResponse { + int64 adminId = 1; +} + +// 修改管理员 +message UpdateAdminRequest { + int64 adminId = 1; + string username = 2; + string password = 3; + string fullname = 4; + bytes modulesJSON = 5; + bool isSuper = 6; +} + +// 计算管理员数量 +message CountAllEnabledAdminsRequest { + +} + +// 列出单页的管理员 +message ListEnabledAdminsRequest { + int64 offset = 1; + int64 size = 2; +} + +message ListEnabledAdminsResponse { + repeated Admin admins = 1; +} + +// 删除管理员 +message DeleteAdminRequest { + int64 adminId = 1; } \ No newline at end of file diff --git a/pkg/systemconfigs/admin_module.go b/pkg/systemconfigs/admin_module.go new file mode 100644 index 0000000..b57c82a --- /dev/null +++ b/pkg/systemconfigs/admin_module.go @@ -0,0 +1,8 @@ +package systemconfigs + +// 用户模块权限 +type AdminModule struct { + Code string `json:"code"` // 模块代号 + AllowAll bool `json:"allowAll"` // 允许所有的动作 + Actions []string `json:"actions"` // 只允许的动作 +} diff --git a/pkg/systemconfigs/log_config.go b/pkg/systemconfigs/log_config.go index 199900e..4d5b348 100644 --- a/pkg/systemconfigs/log_config.go +++ b/pkg/systemconfigs/log_config.go @@ -11,7 +11,8 @@ func DefaultLogConfig() *LogConfig { Count: 1, Unit: shared.SizeCapacityUnitGB, }, - Days: 30, + Days: 30, + CanChange: true, } } @@ -21,4 +22,5 @@ type LogConfig struct { CanClean bool `json:"canClean"` // 是否可清理 Capacity *shared.SizeCapacity `json:"capacity"` // 容量 Days int `json:"days"` // 自动保存天数 + CanChange bool `json:"canChange"` // 是否允许再次修改配置 }