diff --git a/pkg/rpc/pb/model_admin.pb.go b/pkg/rpc/pb/model_admin.pb.go new file mode 100644 index 0000000..0c38c6f --- /dev/null +++ b/pkg/rpc/pb/model_admin.pb.go @@ -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_admin.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 Admin struct { + state protoimpl.MessageState + 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"` +} + +func (x *Admin) Reset() { + *x = Admin{} + if protoimpl.UnsafeEnabled { + mi := &file_model_admin_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Admin) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Admin) ProtoMessage() {} + +func (x *Admin) ProtoReflect() protoreflect.Message { + mi := &file_model_admin_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 Admin.ProtoReflect.Descriptor instead. +func (*Admin) Descriptor() ([]byte, []int) { + return file_model_admin_proto_rawDescGZIP(), []int{0} +} + +func (x *Admin) GetId() int64 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *Admin) GetFullname() string { + if x != nil { + return x.Fullname + } + return "" +} + +func (x *Admin) GetUsername() string { + if x != nil { + return x.Username + } + return "" +} + +func (x *Admin) GetIsOn() bool { + if x != nil { + return x.IsOn + } + return false +} + +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, +} + +var ( + file_model_admin_proto_rawDescOnce sync.Once + file_model_admin_proto_rawDescData = file_model_admin_proto_rawDesc +) + +func file_model_admin_proto_rawDescGZIP() []byte { + file_model_admin_proto_rawDescOnce.Do(func() { + file_model_admin_proto_rawDescData = protoimpl.X.CompressGZIP(file_model_admin_proto_rawDescData) + }) + return file_model_admin_proto_rawDescData +} + +var file_model_admin_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_model_admin_proto_goTypes = []interface{}{ + (*Admin)(nil), // 0: pb.Admin +} +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 +} + +func init() { file_model_admin_proto_init() } +func file_model_admin_proto_init() { + if File_model_admin_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_model_admin_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Admin); 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_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_model_admin_proto_goTypes, + DependencyIndexes: file_model_admin_proto_depIdxs, + MessageInfos: file_model_admin_proto_msgTypes, + }.Build() + File_model_admin_proto = out.File + file_model_admin_proto_rawDesc = nil + file_model_admin_proto_goTypes = nil + file_model_admin_proto_depIdxs = nil +} diff --git a/pkg/rpc/pb/service_admin.pb.go b/pkg/rpc/pb/service_admin.pb.go index a72d664..6f73e02 100644 --- a/pkg/rpc/pb/service_admin.pb.go +++ b/pkg/rpc/pb/service_admin.pb.go @@ -361,6 +361,109 @@ func (x *CheckAdminExistsResponse) GetMessage() string { return "" } +// 检查用户名是否存在 +type CheckAdminUsernameRequest 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"` +} + +func (x *CheckAdminUsernameRequest) Reset() { + *x = CheckAdminUsernameRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_service_admin_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CheckAdminUsernameRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CheckAdminUsernameRequest) ProtoMessage() {} + +func (x *CheckAdminUsernameRequest) ProtoReflect() protoreflect.Message { + mi := &file_service_admin_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 CheckAdminUsernameRequest.ProtoReflect.Descriptor instead. +func (*CheckAdminUsernameRequest) Descriptor() ([]byte, []int) { + return file_service_admin_proto_rawDescGZIP(), []int{6} +} + +func (x *CheckAdminUsernameRequest) GetAdminId() int64 { + if x != nil { + return x.AdminId + } + return 0 +} + +func (x *CheckAdminUsernameRequest) GetUsername() string { + if x != nil { + return x.Username + } + return "" +} + +type CheckAdminUsernameResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Exists bool `protobuf:"varint,1,opt,name=exists,proto3" json:"exists,omitempty"` +} + +func (x *CheckAdminUsernameResponse) Reset() { + *x = CheckAdminUsernameResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_service_admin_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CheckAdminUsernameResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CheckAdminUsernameResponse) ProtoMessage() {} + +func (x *CheckAdminUsernameResponse) ProtoReflect() protoreflect.Message { + mi := &file_service_admin_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 CheckAdminUsernameResponse.ProtoReflect.Descriptor instead. +func (*CheckAdminUsernameResponse) Descriptor() ([]byte, []int) { + return file_service_admin_proto_rawDescGZIP(), []int{7} +} + +func (x *CheckAdminUsernameResponse) GetExists() bool { + if x != nil { + return x.Exists + } + return false +} + // 获取管理员名称 type FindAdminFullnameRequest struct { state protoimpl.MessageState @@ -373,7 +476,7 @@ type FindAdminFullnameRequest struct { func (x *FindAdminFullnameRequest) Reset() { *x = FindAdminFullnameRequest{} if protoimpl.UnsafeEnabled { - mi := &file_service_admin_proto_msgTypes[6] + mi := &file_service_admin_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -386,7 +489,7 @@ func (x *FindAdminFullnameRequest) String() string { func (*FindAdminFullnameRequest) ProtoMessage() {} func (x *FindAdminFullnameRequest) ProtoReflect() protoreflect.Message { - mi := &file_service_admin_proto_msgTypes[6] + mi := &file_service_admin_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -399,7 +502,7 @@ func (x *FindAdminFullnameRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use FindAdminFullnameRequest.ProtoReflect.Descriptor instead. func (*FindAdminFullnameRequest) Descriptor() ([]byte, []int) { - return file_service_admin_proto_rawDescGZIP(), []int{6} + return file_service_admin_proto_rawDescGZIP(), []int{8} } func (x *FindAdminFullnameRequest) GetAdminId() int64 { @@ -420,7 +523,7 @@ type FindAdminFullnameResponse struct { func (x *FindAdminFullnameResponse) Reset() { *x = FindAdminFullnameResponse{} if protoimpl.UnsafeEnabled { - mi := &file_service_admin_proto_msgTypes[7] + mi := &file_service_admin_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -433,7 +536,7 @@ func (x *FindAdminFullnameResponse) String() string { func (*FindAdminFullnameResponse) ProtoMessage() {} func (x *FindAdminFullnameResponse) ProtoReflect() protoreflect.Message { - mi := &file_service_admin_proto_msgTypes[7] + mi := &file_service_admin_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -446,7 +549,7 @@ func (x *FindAdminFullnameResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use FindAdminFullnameResponse.ProtoReflect.Descriptor instead. func (*FindAdminFullnameResponse) Descriptor() ([]byte, []int) { - return file_service_admin_proto_rawDescGZIP(), []int{7} + return file_service_admin_proto_rawDescGZIP(), []int{9} } func (x *FindAdminFullnameResponse) GetFullname() string { @@ -456,6 +559,101 @@ func (x *FindAdminFullnameResponse) GetFullname() string { return "" } +// 获取管理员信息 +type FindEnabledAdminRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + AdminId int64 `protobuf:"varint,1,opt,name=adminId,proto3" json:"adminId,omitempty"` +} + +func (x *FindEnabledAdminRequest) Reset() { + *x = FindEnabledAdminRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_service_admin_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FindEnabledAdminRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FindEnabledAdminRequest) ProtoMessage() {} + +func (x *FindEnabledAdminRequest) ProtoReflect() protoreflect.Message { + mi := &file_service_admin_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 FindEnabledAdminRequest.ProtoReflect.Descriptor instead. +func (*FindEnabledAdminRequest) Descriptor() ([]byte, []int) { + return file_service_admin_proto_rawDescGZIP(), []int{10} +} + +func (x *FindEnabledAdminRequest) GetAdminId() int64 { + if x != nil { + return x.AdminId + } + return 0 +} + +type FindEnabledAdminResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Admin *Admin `protobuf:"bytes,1,opt,name=admin,proto3" json:"admin,omitempty"` +} + +func (x *FindEnabledAdminResponse) Reset() { + *x = FindEnabledAdminResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_service_admin_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FindEnabledAdminResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FindEnabledAdminResponse) ProtoMessage() {} + +func (x *FindEnabledAdminResponse) ProtoReflect() protoreflect.Message { + mi := &file_service_admin_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 FindEnabledAdminResponse.ProtoReflect.Descriptor instead. +func (*FindEnabledAdminResponse) Descriptor() ([]byte, []int) { + return file_service_admin_proto_rawDescGZIP(), []int{11} +} + +func (x *FindEnabledAdminResponse) GetAdmin() *Admin { + if x != nil { + return x.Admin + } + return nil +} + // 创建或修改管理员 type CreateOrUpdateAdminRequest struct { state protoimpl.MessageState @@ -469,7 +667,7 @@ type CreateOrUpdateAdminRequest struct { func (x *CreateOrUpdateAdminRequest) Reset() { *x = CreateOrUpdateAdminRequest{} if protoimpl.UnsafeEnabled { - mi := &file_service_admin_proto_msgTypes[8] + mi := &file_service_admin_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -482,7 +680,7 @@ func (x *CreateOrUpdateAdminRequest) String() string { func (*CreateOrUpdateAdminRequest) ProtoMessage() {} func (x *CreateOrUpdateAdminRequest) ProtoReflect() protoreflect.Message { - mi := &file_service_admin_proto_msgTypes[8] + mi := &file_service_admin_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -495,7 +693,7 @@ func (x *CreateOrUpdateAdminRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use CreateOrUpdateAdminRequest.ProtoReflect.Descriptor instead. func (*CreateOrUpdateAdminRequest) Descriptor() ([]byte, []int) { - return file_service_admin_proto_rawDescGZIP(), []int{8} + return file_service_admin_proto_rawDescGZIP(), []int{12} } func (x *CreateOrUpdateAdminRequest) GetUsername() string { @@ -523,7 +721,7 @@ type CreateOrUpdateAdminResponse struct { func (x *CreateOrUpdateAdminResponse) Reset() { *x = CreateOrUpdateAdminResponse{} if protoimpl.UnsafeEnabled { - mi := &file_service_admin_proto_msgTypes[9] + mi := &file_service_admin_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -536,7 +734,7 @@ func (x *CreateOrUpdateAdminResponse) String() string { func (*CreateOrUpdateAdminResponse) ProtoMessage() {} func (x *CreateOrUpdateAdminResponse) ProtoReflect() protoreflect.Message { - mi := &file_service_admin_proto_msgTypes[9] + mi := &file_service_admin_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -549,7 +747,7 @@ func (x *CreateOrUpdateAdminResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use CreateOrUpdateAdminResponse.ProtoReflect.Descriptor instead. func (*CreateOrUpdateAdminResponse) Descriptor() ([]byte, []int) { - return file_service_admin_proto_rawDescGZIP(), []int{9} + return file_service_admin_proto_rawDescGZIP(), []int{13} } func (x *CreateOrUpdateAdminResponse) GetAdminId() int64 { @@ -559,81 +757,249 @@ func (x *CreateOrUpdateAdminResponse) GetAdminId() int64 { 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"` + Fullname string `protobuf:"bytes,2,opt,name=fullname,proto3" json:"fullname,omitempty"` +} + +func (x *UpdateAdminRequest) Reset() { + *x = UpdateAdminRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_service_admin_proto_msgTypes[14] + 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[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 UpdateAdminRequest.ProtoReflect.Descriptor instead. +func (*UpdateAdminRequest) Descriptor() ([]byte, []int) { + return file_service_admin_proto_rawDescGZIP(), []int{14} +} + +func (x *UpdateAdminRequest) GetAdminId() int64 { + if x != nil { + return x.AdminId + } + return 0 +} + +func (x *UpdateAdminRequest) GetFullname() string { + if x != nil { + return x.Fullname + } + return "" +} + +// 修改管理员登录信息 +type UpdateAdminLoginRequest 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"` +} + +func (x *UpdateAdminLoginRequest) Reset() { + *x = UpdateAdminLoginRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_service_admin_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateAdminLoginRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateAdminLoginRequest) ProtoMessage() {} + +func (x *UpdateAdminLoginRequest) 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 UpdateAdminLoginRequest.ProtoReflect.Descriptor instead. +func (*UpdateAdminLoginRequest) Descriptor() ([]byte, []int) { + return file_service_admin_proto_rawDescGZIP(), []int{15} +} + +func (x *UpdateAdminLoginRequest) GetAdminId() int64 { + if x != nil { + return x.AdminId + } + return 0 +} + +func (x *UpdateAdminLoginRequest) GetUsername() string { + if x != nil { + return x.Username + } + return "" +} + +func (x *UpdateAdminLoginRequest) GetPassword() string { + if x != nil { + return x.Password + } + return "" +} + 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, 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, 0x77, 0x0a, 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x64, - 0x6d, 0x69, 0x6e, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, - 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6c, 0x65, - 0x76, 0x65, 0x6c, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, - 0x02, 0x69, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x70, 0x22, 0x18, 0x0a, - 0x16, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x4c, 0x6f, 0x67, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 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, 0x34, 0x0a, 0x18, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x64, + 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, + 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, 0x77, 0x0a, 0x15, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, + 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, + 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x02, 0x69, 0x70, 0x22, 0x18, 0x0a, 0x16, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x64, + 0x6d, 0x69, 0x6e, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 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, 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, 0x32, 0x8d, 0x03, 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, 0x47, 0x0a, 0x0e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x64, 0x6d, 0x69, - 0x6e, 0x4c, 0x6f, 0x67, 0x12, 0x19, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x1a, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x64, 0x6d, 0x69, 0x6e, - 0x4c, 0x6f, 0x67, 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, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x50, 0x0a, 0x11, 0x66, 0x69, + 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, 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, + 0xb5, 0x05, 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, 0x47, 0x0a, + 0x0e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x4c, 0x6f, 0x67, 0x12, + 0x19, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x64, 0x6d, 0x69, 0x6e, + 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x70, 0x62, 0x2e, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x4c, 0x6f, 0x67, 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, 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, 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, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 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, 0x3b, 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, 0x14, 0x2e, 0x70, 0x62, 0x2e, + 0x52, 0x50, 0x43, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, + 0x12, 0x45, 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, 0x14, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -648,7 +1014,7 @@ func file_service_admin_proto_rawDescGZIP() []byte { return file_service_admin_proto_rawDescData } -var file_service_admin_proto_msgTypes = make([]protoimpl.MessageInfo, 10) +var file_service_admin_proto_msgTypes = make([]protoimpl.MessageInfo, 16) var file_service_admin_proto_goTypes = []interface{}{ (*LoginAdminRequest)(nil), // 0: pb.LoginAdminRequest (*LoginAdminResponse)(nil), // 1: pb.LoginAdminResponse @@ -656,27 +1022,44 @@ var file_service_admin_proto_goTypes = []interface{}{ (*CreateAdminLogResponse)(nil), // 3: pb.CreateAdminLogResponse (*CheckAdminExistsRequest)(nil), // 4: pb.CheckAdminExistsRequest (*CheckAdminExistsResponse)(nil), // 5: pb.CheckAdminExistsResponse - (*FindAdminFullnameRequest)(nil), // 6: pb.FindAdminFullnameRequest - (*FindAdminFullnameResponse)(nil), // 7: pb.FindAdminFullnameResponse - (*CreateOrUpdateAdminRequest)(nil), // 8: pb.CreateOrUpdateAdminRequest - (*CreateOrUpdateAdminResponse)(nil), // 9: pb.CreateOrUpdateAdminResponse + (*CheckAdminUsernameRequest)(nil), // 6: pb.CheckAdminUsernameRequest + (*CheckAdminUsernameResponse)(nil), // 7: pb.CheckAdminUsernameResponse + (*FindAdminFullnameRequest)(nil), // 8: pb.FindAdminFullnameRequest + (*FindAdminFullnameResponse)(nil), // 9: pb.FindAdminFullnameResponse + (*FindEnabledAdminRequest)(nil), // 10: pb.FindEnabledAdminRequest + (*FindEnabledAdminResponse)(nil), // 11: pb.FindEnabledAdminResponse + (*CreateOrUpdateAdminRequest)(nil), // 12: pb.CreateOrUpdateAdminRequest + (*CreateOrUpdateAdminResponse)(nil), // 13: pb.CreateOrUpdateAdminResponse + (*UpdateAdminRequest)(nil), // 14: pb.UpdateAdminRequest + (*UpdateAdminLoginRequest)(nil), // 15: pb.UpdateAdminLoginRequest + (*Admin)(nil), // 16: pb.Admin + (*RPCUpdateSuccess)(nil), // 17: pb.RPCUpdateSuccess } var file_service_admin_proto_depIdxs = []int32{ - 0, // 0: pb.AdminService.loginAdmin:input_type -> pb.LoginAdminRequest - 2, // 1: pb.AdminService.createAdminLog:input_type -> pb.CreateAdminLogRequest - 4, // 2: pb.AdminService.checkAdminExists:input_type -> pb.CheckAdminExistsRequest - 6, // 3: pb.AdminService.findAdminFullname:input_type -> pb.FindAdminFullnameRequest - 8, // 4: pb.AdminService.createOrUpdateAdmin:input_type -> pb.CreateOrUpdateAdminRequest - 1, // 5: pb.AdminService.loginAdmin:output_type -> pb.LoginAdminResponse - 3, // 6: pb.AdminService.createAdminLog:output_type -> pb.CreateAdminLogResponse - 5, // 7: pb.AdminService.checkAdminExists:output_type -> pb.CheckAdminExistsResponse - 7, // 8: pb.AdminService.findAdminFullname:output_type -> pb.FindAdminFullnameResponse - 9, // 9: pb.AdminService.createOrUpdateAdmin:output_type -> pb.CreateOrUpdateAdminResponse - 5, // [5:10] is the sub-list for method output_type - 0, // [0:5] 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 + 16, // 0: pb.FindEnabledAdminResponse.admin:type_name -> pb.Admin + 0, // 1: pb.AdminService.loginAdmin:input_type -> pb.LoginAdminRequest + 2, // 2: pb.AdminService.createAdminLog:input_type -> pb.CreateAdminLogRequest + 4, // 3: pb.AdminService.checkAdminExists:input_type -> pb.CheckAdminExistsRequest + 6, // 4: pb.AdminService.checkAdminUsername:input_type -> pb.CheckAdminUsernameRequest + 8, // 5: pb.AdminService.findAdminFullname:input_type -> pb.FindAdminFullnameRequest + 10, // 6: pb.AdminService.findEnabledAdmin:input_type -> pb.FindEnabledAdminRequest + 12, // 7: pb.AdminService.createOrUpdateAdmin:input_type -> pb.CreateOrUpdateAdminRequest + 14, // 8: pb.AdminService.updateAdmin:input_type -> pb.UpdateAdminRequest + 15, // 9: pb.AdminService.updateAdminLogin:input_type -> pb.UpdateAdminLoginRequest + 1, // 10: pb.AdminService.loginAdmin:output_type -> pb.LoginAdminResponse + 3, // 11: pb.AdminService.createAdminLog:output_type -> pb.CreateAdminLogResponse + 5, // 12: pb.AdminService.checkAdminExists:output_type -> pb.CheckAdminExistsResponse + 7, // 13: pb.AdminService.checkAdminUsername:output_type -> pb.CheckAdminUsernameResponse + 9, // 14: pb.AdminService.findAdminFullname:output_type -> pb.FindAdminFullnameResponse + 11, // 15: pb.AdminService.findEnabledAdmin:output_type -> pb.FindEnabledAdminResponse + 13, // 16: pb.AdminService.createOrUpdateAdmin:output_type -> pb.CreateOrUpdateAdminResponse + 17, // 17: pb.AdminService.updateAdmin:output_type -> pb.RPCUpdateSuccess + 17, // 18: pb.AdminService.updateAdminLogin:output_type -> pb.RPCUpdateSuccess + 10, // [10:19] is the sub-list for method output_type + 1, // [1:10] 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_service_admin_proto_init() } @@ -684,6 +1067,8 @@ func file_service_admin_proto_init() { if File_service_admin_proto != nil { return } + file_model_admin_proto_init() + file_rpc_messages_proto_init() if !protoimpl.UnsafeEnabled { file_service_admin_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*LoginAdminRequest); i { @@ -758,7 +1143,7 @@ func file_service_admin_proto_init() { } } file_service_admin_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FindAdminFullnameRequest); i { + switch v := v.(*CheckAdminUsernameRequest); i { case 0: return &v.state case 1: @@ -770,7 +1155,7 @@ func file_service_admin_proto_init() { } } file_service_admin_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FindAdminFullnameResponse); i { + switch v := v.(*CheckAdminUsernameResponse); i { case 0: return &v.state case 1: @@ -782,7 +1167,7 @@ func file_service_admin_proto_init() { } } file_service_admin_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateOrUpdateAdminRequest); i { + switch v := v.(*FindAdminFullnameRequest); i { case 0: return &v.state case 1: @@ -794,6 +1179,54 @@ func file_service_admin_proto_init() { } } file_service_admin_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FindAdminFullnameResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_admin_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FindEnabledAdminRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_admin_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FindEnabledAdminResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_admin_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateOrUpdateAdminRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_admin_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CreateOrUpdateAdminResponse); i { case 0: return &v.state @@ -805,6 +1238,30 @@ func file_service_admin_proto_init() { return nil } } + file_service_admin_proto_msgTypes[14].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[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateAdminLoginRequest); 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{ @@ -812,7 +1269,7 @@ func file_service_admin_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_service_admin_proto_rawDesc, NumEnums: 0, - NumMessages: 10, + NumMessages: 16, NumExtensions: 0, NumServices: 1, }, @@ -844,10 +1301,18 @@ type AdminServiceClient interface { CreateAdminLog(ctx context.Context, in *CreateAdminLogRequest, opts ...grpc.CallOption) (*CreateAdminLogResponse, error) // 检查管理员是否存在 CheckAdminExists(ctx context.Context, in *CheckAdminExistsRequest, opts ...grpc.CallOption) (*CheckAdminExistsResponse, error) + // 检查用户名是否存在 + CheckAdminUsername(ctx context.Context, in *CheckAdminUsernameRequest, opts ...grpc.CallOption) (*CheckAdminUsernameResponse, error) // 获取管理员名称 FindAdminFullname(ctx context.Context, in *FindAdminFullnameRequest, opts ...grpc.CallOption) (*FindAdminFullnameResponse, error) + // 获取管理员信息 + FindEnabledAdmin(ctx context.Context, in *FindEnabledAdminRequest, opts ...grpc.CallOption) (*FindEnabledAdminResponse, error) // 创建或修改管理员 CreateOrUpdateAdmin(ctx context.Context, in *CreateOrUpdateAdminRequest, opts ...grpc.CallOption) (*CreateOrUpdateAdminResponse, error) + // 修改管理员信息 + UpdateAdmin(ctx context.Context, in *UpdateAdminRequest, opts ...grpc.CallOption) (*RPCUpdateSuccess, error) + // 修改管理员登录信息 + UpdateAdminLogin(ctx context.Context, in *UpdateAdminLoginRequest, opts ...grpc.CallOption) (*RPCUpdateSuccess, error) } type adminServiceClient struct { @@ -885,6 +1350,15 @@ func (c *adminServiceClient) CheckAdminExists(ctx context.Context, in *CheckAdmi return out, nil } +func (c *adminServiceClient) CheckAdminUsername(ctx context.Context, in *CheckAdminUsernameRequest, opts ...grpc.CallOption) (*CheckAdminUsernameResponse, error) { + out := new(CheckAdminUsernameResponse) + err := c.cc.Invoke(ctx, "/pb.AdminService/checkAdminUsername", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *adminServiceClient) FindAdminFullname(ctx context.Context, in *FindAdminFullnameRequest, opts ...grpc.CallOption) (*FindAdminFullnameResponse, error) { out := new(FindAdminFullnameResponse) err := c.cc.Invoke(ctx, "/pb.AdminService/findAdminFullname", in, out, opts...) @@ -894,6 +1368,15 @@ func (c *adminServiceClient) FindAdminFullname(ctx context.Context, in *FindAdmi return out, nil } +func (c *adminServiceClient) FindEnabledAdmin(ctx context.Context, in *FindEnabledAdminRequest, opts ...grpc.CallOption) (*FindEnabledAdminResponse, error) { + out := new(FindEnabledAdminResponse) + err := c.cc.Invoke(ctx, "/pb.AdminService/findEnabledAdmin", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *adminServiceClient) CreateOrUpdateAdmin(ctx context.Context, in *CreateOrUpdateAdminRequest, opts ...grpc.CallOption) (*CreateOrUpdateAdminResponse, error) { out := new(CreateOrUpdateAdminResponse) err := c.cc.Invoke(ctx, "/pb.AdminService/createOrUpdateAdmin", in, out, opts...) @@ -903,6 +1386,24 @@ func (c *adminServiceClient) CreateOrUpdateAdmin(ctx context.Context, in *Create return out, nil } +func (c *adminServiceClient) UpdateAdmin(ctx context.Context, in *UpdateAdminRequest, opts ...grpc.CallOption) (*RPCUpdateSuccess, error) { + out := new(RPCUpdateSuccess) + err := c.cc.Invoke(ctx, "/pb.AdminService/updateAdmin", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *adminServiceClient) UpdateAdminLogin(ctx context.Context, in *UpdateAdminLoginRequest, opts ...grpc.CallOption) (*RPCUpdateSuccess, error) { + out := new(RPCUpdateSuccess) + err := c.cc.Invoke(ctx, "/pb.AdminService/updateAdminLogin", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // AdminServiceServer is the server API for AdminService service. type AdminServiceServer interface { // 登录 @@ -911,10 +1412,18 @@ type AdminServiceServer interface { CreateAdminLog(context.Context, *CreateAdminLogRequest) (*CreateAdminLogResponse, error) // 检查管理员是否存在 CheckAdminExists(context.Context, *CheckAdminExistsRequest) (*CheckAdminExistsResponse, error) + // 检查用户名是否存在 + CheckAdminUsername(context.Context, *CheckAdminUsernameRequest) (*CheckAdminUsernameResponse, error) // 获取管理员名称 FindAdminFullname(context.Context, *FindAdminFullnameRequest) (*FindAdminFullnameResponse, error) + // 获取管理员信息 + FindEnabledAdmin(context.Context, *FindEnabledAdminRequest) (*FindEnabledAdminResponse, error) // 创建或修改管理员 CreateOrUpdateAdmin(context.Context, *CreateOrUpdateAdminRequest) (*CreateOrUpdateAdminResponse, error) + // 修改管理员信息 + UpdateAdmin(context.Context, *UpdateAdminRequest) (*RPCUpdateSuccess, error) + // 修改管理员登录信息 + UpdateAdminLogin(context.Context, *UpdateAdminLoginRequest) (*RPCUpdateSuccess, error) } // UnimplementedAdminServiceServer can be embedded to have forward compatible implementations. @@ -930,12 +1439,24 @@ func (*UnimplementedAdminServiceServer) CreateAdminLog(context.Context, *CreateA func (*UnimplementedAdminServiceServer) CheckAdminExists(context.Context, *CheckAdminExistsRequest) (*CheckAdminExistsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CheckAdminExists not implemented") } +func (*UnimplementedAdminServiceServer) CheckAdminUsername(context.Context, *CheckAdminUsernameRequest) (*CheckAdminUsernameResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CheckAdminUsername not implemented") +} func (*UnimplementedAdminServiceServer) FindAdminFullname(context.Context, *FindAdminFullnameRequest) (*FindAdminFullnameResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method FindAdminFullname not implemented") } +func (*UnimplementedAdminServiceServer) FindEnabledAdmin(context.Context, *FindEnabledAdminRequest) (*FindEnabledAdminResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method FindEnabledAdmin not implemented") +} func (*UnimplementedAdminServiceServer) CreateOrUpdateAdmin(context.Context, *CreateOrUpdateAdminRequest) (*CreateOrUpdateAdminResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CreateOrUpdateAdmin not implemented") } +func (*UnimplementedAdminServiceServer) UpdateAdmin(context.Context, *UpdateAdminRequest) (*RPCUpdateSuccess, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateAdmin not implemented") +} +func (*UnimplementedAdminServiceServer) UpdateAdminLogin(context.Context, *UpdateAdminLoginRequest) (*RPCUpdateSuccess, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateAdminLogin not implemented") +} func RegisterAdminServiceServer(s *grpc.Server, srv AdminServiceServer) { s.RegisterService(&_AdminService_serviceDesc, srv) @@ -995,6 +1516,24 @@ func _AdminService_CheckAdminExists_Handler(srv interface{}, ctx context.Context return interceptor(ctx, in, info, handler) } +func _AdminService_CheckAdminUsername_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CheckAdminUsernameRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AdminServiceServer).CheckAdminUsername(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.AdminService/CheckAdminUsername", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AdminServiceServer).CheckAdminUsername(ctx, req.(*CheckAdminUsernameRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _AdminService_FindAdminFullname_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(FindAdminFullnameRequest) if err := dec(in); err != nil { @@ -1013,6 +1552,24 @@ func _AdminService_FindAdminFullname_Handler(srv interface{}, ctx context.Contex return interceptor(ctx, in, info, handler) } +func _AdminService_FindEnabledAdmin_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(FindEnabledAdminRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AdminServiceServer).FindEnabledAdmin(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.AdminService/FindEnabledAdmin", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AdminServiceServer).FindEnabledAdmin(ctx, req.(*FindEnabledAdminRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _AdminService_CreateOrUpdateAdmin_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(CreateOrUpdateAdminRequest) if err := dec(in); err != nil { @@ -1031,6 +1588,42 @@ 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) + 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_UpdateAdminLogin_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateAdminLoginRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AdminServiceServer).UpdateAdminLogin(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.AdminService/UpdateAdminLogin", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AdminServiceServer).UpdateAdminLogin(ctx, req.(*UpdateAdminLoginRequest)) + } + return interceptor(ctx, in, info, handler) +} + var _AdminService_serviceDesc = grpc.ServiceDesc{ ServiceName: "pb.AdminService", HandlerType: (*AdminServiceServer)(nil), @@ -1047,14 +1640,30 @@ var _AdminService_serviceDesc = grpc.ServiceDesc{ MethodName: "checkAdminExists", Handler: _AdminService_CheckAdminExists_Handler, }, + { + MethodName: "checkAdminUsername", + Handler: _AdminService_CheckAdminUsername_Handler, + }, { MethodName: "findAdminFullname", Handler: _AdminService_FindAdminFullname_Handler, }, + { + MethodName: "findEnabledAdmin", + Handler: _AdminService_FindEnabledAdmin_Handler, + }, { MethodName: "createOrUpdateAdmin", Handler: _AdminService_CreateOrUpdateAdmin_Handler, }, + { + MethodName: "updateAdmin", + Handler: _AdminService_UpdateAdmin_Handler, + }, + { + MethodName: "updateAdminLogin", + Handler: _AdminService_UpdateAdminLogin_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "service_admin.proto", diff --git a/pkg/rpc/protos/model_admin.proto b/pkg/rpc/protos/model_admin.proto new file mode 100644 index 0000000..5704b0f --- /dev/null +++ b/pkg/rpc/protos/model_admin.proto @@ -0,0 +1,11 @@ +syntax = "proto3"; +option go_package = "./pb"; + +package pb; + +message Admin { + int64 id = 1; + string fullname = 2; + string username = 3; + bool isOn = 4; +} \ No newline at end of file diff --git a/pkg/rpc/protos/service_admin.proto b/pkg/rpc/protos/service_admin.proto index ae06bb3..3cf54e0 100644 --- a/pkg/rpc/protos/service_admin.proto +++ b/pkg/rpc/protos/service_admin.proto @@ -3,6 +3,8 @@ option go_package = "./pb"; package pb; +import "model_admin.proto"; +import "rpc_messages.proto"; service AdminService { // 登录 @@ -14,11 +16,23 @@ service AdminService { // 检查管理员是否存在 rpc checkAdminExists (CheckAdminExistsRequest) returns (CheckAdminExistsResponse); + // 检查用户名是否存在 + rpc checkAdminUsername (CheckAdminUsernameRequest) returns (CheckAdminUsernameResponse); + // 获取管理员名称 rpc findAdminFullname (FindAdminFullnameRequest) returns (FindAdminFullnameResponse); + // 获取管理员信息 + rpc findEnabledAdmin (FindEnabledAdminRequest) returns (FindEnabledAdminResponse); + // 创建或修改管理员 rpc createOrUpdateAdmin (CreateOrUpdateAdminRequest) returns (CreateOrUpdateAdminResponse); + + // 修改管理员信息 + rpc updateAdmin (UpdateAdminRequest) returns (RPCUpdateSuccess); + + // 修改管理员登录信息 + rpc updateAdminLogin (UpdateAdminLoginRequest) returns (RPCUpdateSuccess); } // 登录 @@ -54,6 +68,16 @@ message CheckAdminExistsResponse { string message = 2; } +// 检查用户名是否存在 +message CheckAdminUsernameRequest { + int64 adminId = 1; + string username = 2; +} + +message CheckAdminUsernameResponse { + bool exists = 1; +} + // 获取管理员名称 message FindAdminFullnameRequest { int64 adminId = 1; @@ -63,6 +87,15 @@ message FindAdminFullnameResponse { string fullname = 1; } +// 获取管理员信息 +message FindEnabledAdminRequest { + int64 adminId = 1; +} + +message FindEnabledAdminResponse { + Admin admin = 1; +} + // 创建或修改管理员 message CreateOrUpdateAdminRequest { string username = 1; @@ -71,4 +104,17 @@ message CreateOrUpdateAdminRequest { message CreateOrUpdateAdminResponse { int64 adminId = 1; +} + +// 修改管理员信息 +message UpdateAdminRequest { + int64 adminId = 1; + string fullname = 2; +} + +// 修改管理员登录信息 +message UpdateAdminLoginRequest { + int64 adminId = 1; + string username = 2; + string password = 3; } \ No newline at end of file