diff --git a/pkg/rpc/pb/model_acme_user.pb.go b/pkg/rpc/pb/model_acme_user.pb.go new file mode 100644 index 0000000..9d7d44a --- /dev/null +++ b/pkg/rpc/pb/model_acme_user.pb.go @@ -0,0 +1,175 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.25.0 +// protoc v3.12.3 +// source: model_acme_user.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 ACMEUser struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + Email string `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"` + Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` + CreatedAt int64 `protobuf:"varint,4,opt,name=createdAt,proto3" json:"createdAt,omitempty"` +} + +func (x *ACMEUser) Reset() { + *x = ACMEUser{} + if protoimpl.UnsafeEnabled { + mi := &file_model_acme_user_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ACMEUser) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ACMEUser) ProtoMessage() {} + +func (x *ACMEUser) ProtoReflect() protoreflect.Message { + mi := &file_model_acme_user_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 ACMEUser.ProtoReflect.Descriptor instead. +func (*ACMEUser) Descriptor() ([]byte, []int) { + return file_model_acme_user_proto_rawDescGZIP(), []int{0} +} + +func (x *ACMEUser) GetId() int64 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *ACMEUser) GetEmail() string { + if x != nil { + return x.Email + } + return "" +} + +func (x *ACMEUser) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *ACMEUser) GetCreatedAt() int64 { + if x != nil { + return x.CreatedAt + } + return 0 +} + +var File_model_acme_user_proto protoreflect.FileDescriptor + +var file_model_acme_user_proto_rawDesc = []byte{ + 0x0a, 0x15, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x61, 0x63, 0x6d, 0x65, 0x5f, 0x75, 0x73, 0x65, + 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x22, 0x70, 0x0a, 0x08, 0x41, + 0x43, 0x4d, 0x45, 0x55, 0x73, 0x65, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x20, 0x0a, + 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x1c, 0x0a, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x42, 0x06, 0x5a, + 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_model_acme_user_proto_rawDescOnce sync.Once + file_model_acme_user_proto_rawDescData = file_model_acme_user_proto_rawDesc +) + +func file_model_acme_user_proto_rawDescGZIP() []byte { + file_model_acme_user_proto_rawDescOnce.Do(func() { + file_model_acme_user_proto_rawDescData = protoimpl.X.CompressGZIP(file_model_acme_user_proto_rawDescData) + }) + return file_model_acme_user_proto_rawDescData +} + +var file_model_acme_user_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_model_acme_user_proto_goTypes = []interface{}{ + (*ACMEUser)(nil), // 0: pb.ACMEUser +} +var file_model_acme_user_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_acme_user_proto_init() } +func file_model_acme_user_proto_init() { + if File_model_acme_user_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_model_acme_user_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ACMEUser); 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_acme_user_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_model_acme_user_proto_goTypes, + DependencyIndexes: file_model_acme_user_proto_depIdxs, + MessageInfos: file_model_acme_user_proto_msgTypes, + }.Build() + File_model_acme_user_proto = out.File + file_model_acme_user_proto_rawDesc = nil + file_model_acme_user_proto_goTypes = nil + file_model_acme_user_proto_depIdxs = nil +} diff --git a/pkg/rpc/pb/service_acme_user.pb.go b/pkg/rpc/pb/service_acme_user.pb.go new file mode 100644 index 0000000..c654824 --- /dev/null +++ b/pkg/rpc/pb/service_acme_user.pb.go @@ -0,0 +1,1046 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.25.0 +// protoc v3.12.3 +// source: service_acme_user.proto + +package pb + +import ( + context "context" + proto "github.com/golang/protobuf/proto" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + 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 CreateACMEUserRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"` + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` +} + +func (x *CreateACMEUserRequest) Reset() { + *x = CreateACMEUserRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_service_acme_user_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateACMEUserRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateACMEUserRequest) ProtoMessage() {} + +func (x *CreateACMEUserRequest) ProtoReflect() protoreflect.Message { + mi := &file_service_acme_user_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 CreateACMEUserRequest.ProtoReflect.Descriptor instead. +func (*CreateACMEUserRequest) Descriptor() ([]byte, []int) { + return file_service_acme_user_proto_rawDescGZIP(), []int{0} +} + +func (x *CreateACMEUserRequest) GetEmail() string { + if x != nil { + return x.Email + } + return "" +} + +func (x *CreateACMEUserRequest) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +type CreateACMEUserResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + AcmeUserId int64 `protobuf:"varint,1,opt,name=acmeUserId,proto3" json:"acmeUserId,omitempty"` +} + +func (x *CreateACMEUserResponse) Reset() { + *x = CreateACMEUserResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_service_acme_user_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateACMEUserResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateACMEUserResponse) ProtoMessage() {} + +func (x *CreateACMEUserResponse) ProtoReflect() protoreflect.Message { + mi := &file_service_acme_user_proto_msgTypes[1] + 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 CreateACMEUserResponse.ProtoReflect.Descriptor instead. +func (*CreateACMEUserResponse) Descriptor() ([]byte, []int) { + return file_service_acme_user_proto_rawDescGZIP(), []int{1} +} + +func (x *CreateACMEUserResponse) GetAcmeUserId() int64 { + if x != nil { + return x.AcmeUserId + } + return 0 +} + +// 修改用户 +type UpdateACMEUserRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + AcmeUserId int64 `protobuf:"varint,1,opt,name=acmeUserId,proto3" json:"acmeUserId,omitempty"` + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` +} + +func (x *UpdateACMEUserRequest) Reset() { + *x = UpdateACMEUserRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_service_acme_user_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateACMEUserRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateACMEUserRequest) ProtoMessage() {} + +func (x *UpdateACMEUserRequest) ProtoReflect() protoreflect.Message { + mi := &file_service_acme_user_proto_msgTypes[2] + 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 UpdateACMEUserRequest.ProtoReflect.Descriptor instead. +func (*UpdateACMEUserRequest) Descriptor() ([]byte, []int) { + return file_service_acme_user_proto_rawDescGZIP(), []int{2} +} + +func (x *UpdateACMEUserRequest) GetAcmeUserId() int64 { + if x != nil { + return x.AcmeUserId + } + return 0 +} + +func (x *UpdateACMEUserRequest) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +// 删除用户 +type DeleteACMEUserRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + AcmeUserId int64 `protobuf:"varint,1,opt,name=acmeUserId,proto3" json:"acmeUserId,omitempty"` +} + +func (x *DeleteACMEUserRequest) Reset() { + *x = DeleteACMEUserRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_service_acme_user_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteACMEUserRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteACMEUserRequest) ProtoMessage() {} + +func (x *DeleteACMEUserRequest) ProtoReflect() protoreflect.Message { + mi := &file_service_acme_user_proto_msgTypes[3] + 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 DeleteACMEUserRequest.ProtoReflect.Descriptor instead. +func (*DeleteACMEUserRequest) Descriptor() ([]byte, []int) { + return file_service_acme_user_proto_rawDescGZIP(), []int{3} +} + +func (x *DeleteACMEUserRequest) GetAcmeUserId() int64 { + if x != nil { + return x.AcmeUserId + } + return 0 +} + +// 计算用户数量 +type CountAcmeUsersRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + AdminId int64 `protobuf:"varint,1,opt,name=adminId,proto3" json:"adminId,omitempty"` + UserId int64 `protobuf:"varint,2,opt,name=userId,proto3" json:"userId,omitempty"` +} + +func (x *CountAcmeUsersRequest) Reset() { + *x = CountAcmeUsersRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_service_acme_user_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CountAcmeUsersRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CountAcmeUsersRequest) ProtoMessage() {} + +func (x *CountAcmeUsersRequest) ProtoReflect() protoreflect.Message { + mi := &file_service_acme_user_proto_msgTypes[4] + 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 CountAcmeUsersRequest.ProtoReflect.Descriptor instead. +func (*CountAcmeUsersRequest) Descriptor() ([]byte, []int) { + return file_service_acme_user_proto_rawDescGZIP(), []int{4} +} + +func (x *CountAcmeUsersRequest) GetAdminId() int64 { + if x != nil { + return x.AdminId + } + return 0 +} + +func (x *CountAcmeUsersRequest) GetUserId() int64 { + if x != nil { + return x.UserId + } + return 0 +} + +// 列出单页用户 +type ListACMEUsersRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + AdminId int64 `protobuf:"varint,1,opt,name=adminId,proto3" json:"adminId,omitempty"` + UserId int64 `protobuf:"varint,2,opt,name=userId,proto3" json:"userId,omitempty"` + Offset int64 `protobuf:"varint,3,opt,name=offset,proto3" json:"offset,omitempty"` + Size int64 `protobuf:"varint,4,opt,name=size,proto3" json:"size,omitempty"` +} + +func (x *ListACMEUsersRequest) Reset() { + *x = ListACMEUsersRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_service_acme_user_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListACMEUsersRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListACMEUsersRequest) ProtoMessage() {} + +func (x *ListACMEUsersRequest) ProtoReflect() protoreflect.Message { + mi := &file_service_acme_user_proto_msgTypes[5] + 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 ListACMEUsersRequest.ProtoReflect.Descriptor instead. +func (*ListACMEUsersRequest) Descriptor() ([]byte, []int) { + return file_service_acme_user_proto_rawDescGZIP(), []int{5} +} + +func (x *ListACMEUsersRequest) GetAdminId() int64 { + if x != nil { + return x.AdminId + } + return 0 +} + +func (x *ListACMEUsersRequest) GetUserId() int64 { + if x != nil { + return x.UserId + } + return 0 +} + +func (x *ListACMEUsersRequest) GetOffset() int64 { + if x != nil { + return x.Offset + } + return 0 +} + +func (x *ListACMEUsersRequest) GetSize() int64 { + if x != nil { + return x.Size + } + return 0 +} + +type ListACMEUsersResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + AcmeUsers []*ACMEUser `protobuf:"bytes,1,rep,name=acmeUsers,proto3" json:"acmeUsers,omitempty"` +} + +func (x *ListACMEUsersResponse) Reset() { + *x = ListACMEUsersResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_service_acme_user_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListACMEUsersResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListACMEUsersResponse) ProtoMessage() {} + +func (x *ListACMEUsersResponse) ProtoReflect() protoreflect.Message { + mi := &file_service_acme_user_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 ListACMEUsersResponse.ProtoReflect.Descriptor instead. +func (*ListACMEUsersResponse) Descriptor() ([]byte, []int) { + return file_service_acme_user_proto_rawDescGZIP(), []int{6} +} + +func (x *ListACMEUsersResponse) GetAcmeUsers() []*ACMEUser { + if x != nil { + return x.AcmeUsers + } + return nil +} + +// 查找单个用户 +type FindEnabledACMEUserRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + AcmeUserId int64 `protobuf:"varint,1,opt,name=acmeUserId,proto3" json:"acmeUserId,omitempty"` +} + +func (x *FindEnabledACMEUserRequest) Reset() { + *x = FindEnabledACMEUserRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_service_acme_user_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FindEnabledACMEUserRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FindEnabledACMEUserRequest) ProtoMessage() {} + +func (x *FindEnabledACMEUserRequest) ProtoReflect() protoreflect.Message { + mi := &file_service_acme_user_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 FindEnabledACMEUserRequest.ProtoReflect.Descriptor instead. +func (*FindEnabledACMEUserRequest) Descriptor() ([]byte, []int) { + return file_service_acme_user_proto_rawDescGZIP(), []int{7} +} + +func (x *FindEnabledACMEUserRequest) GetAcmeUserId() int64 { + if x != nil { + return x.AcmeUserId + } + return 0 +} + +type FindEnabledACMEUserResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + AcmeUser *ACMEUser `protobuf:"bytes,1,opt,name=acmeUser,proto3" json:"acmeUser,omitempty"` +} + +func (x *FindEnabledACMEUserResponse) Reset() { + *x = FindEnabledACMEUserResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_service_acme_user_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FindEnabledACMEUserResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FindEnabledACMEUserResponse) ProtoMessage() {} + +func (x *FindEnabledACMEUserResponse) ProtoReflect() protoreflect.Message { + mi := &file_service_acme_user_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FindEnabledACMEUserResponse.ProtoReflect.Descriptor instead. +func (*FindEnabledACMEUserResponse) Descriptor() ([]byte, []int) { + return file_service_acme_user_proto_rawDescGZIP(), []int{8} +} + +func (x *FindEnabledACMEUserResponse) GetAcmeUser() *ACMEUser { + if x != nil { + return x.AcmeUser + } + return nil +} + +var File_service_acme_user_proto protoreflect.FileDescriptor + +var file_service_acme_user_proto_rawDesc = []byte{ + 0x0a, 0x17, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x61, 0x63, 0x6d, 0x65, 0x5f, 0x75, + 0x73, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x1a, 0x12, 0x72, + 0x70, 0x63, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x15, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x61, 0x63, 0x6d, 0x65, 0x5f, 0x75, 0x73, + 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x4f, 0x0a, 0x15, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x41, 0x43, 0x4d, 0x45, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 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, 0x22, 0x38, 0x0a, 0x16, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x41, 0x43, 0x4d, 0x45, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x63, 0x6d, 0x65, 0x55, 0x73, 0x65, 0x72, 0x49, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x61, 0x63, 0x6d, 0x65, 0x55, 0x73, 0x65, + 0x72, 0x49, 0x64, 0x22, 0x59, 0x0a, 0x15, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x43, 0x4d, + 0x45, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x0a, + 0x61, 0x63, 0x6d, 0x65, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x0a, 0x61, 0x63, 0x6d, 0x65, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 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, 0x22, 0x37, + 0x0a, 0x15, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x43, 0x4d, 0x45, 0x55, 0x73, 0x65, 0x72, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x63, 0x6d, 0x65, 0x55, + 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x61, 0x63, 0x6d, + 0x65, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x22, 0x49, 0x0a, 0x15, 0x43, 0x6f, 0x75, 0x6e, 0x74, + 0x41, 0x63, 0x6d, 0x65, 0x55, 0x73, 0x65, 0x72, 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, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, + 0x65, 0x72, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, + 0x49, 0x64, 0x22, 0x74, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x43, 0x4d, 0x45, 0x55, 0x73, + 0x65, 0x72, 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, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, + 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x6f, 0x66, + 0x66, 0x73, 0x65, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x22, 0x43, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, + 0x41, 0x43, 0x4d, 0x45, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x2a, 0x0a, 0x09, 0x61, 0x63, 0x6d, 0x65, 0x55, 0x73, 0x65, 0x72, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x70, 0x62, 0x2e, 0x41, 0x43, 0x4d, 0x45, 0x55, 0x73, + 0x65, 0x72, 0x52, 0x09, 0x61, 0x63, 0x6d, 0x65, 0x55, 0x73, 0x65, 0x72, 0x73, 0x22, 0x3c, 0x0a, + 0x1a, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x41, 0x43, 0x4d, 0x45, + 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x61, + 0x63, 0x6d, 0x65, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x0a, 0x61, 0x63, 0x6d, 0x65, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x22, 0x47, 0x0a, 0x1b, 0x46, + 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x41, 0x43, 0x4d, 0x45, 0x55, 0x73, + 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x28, 0x0a, 0x08, 0x61, 0x63, + 0x6d, 0x65, 0x55, 0x73, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x70, + 0x62, 0x2e, 0x41, 0x43, 0x4d, 0x45, 0x55, 0x73, 0x65, 0x72, 0x52, 0x08, 0x61, 0x63, 0x6d, 0x65, + 0x55, 0x73, 0x65, 0x72, 0x32, 0xb5, 0x03, 0x0a, 0x0f, 0x41, 0x43, 0x4d, 0x45, 0x55, 0x73, 0x65, + 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x47, 0x0a, 0x0e, 0x63, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x41, 0x43, 0x4d, 0x45, 0x55, 0x73, 0x65, 0x72, 0x12, 0x19, 0x2e, 0x70, 0x62, 0x2e, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x43, 0x4d, 0x45, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x41, 0x43, 0x4d, 0x45, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x3b, 0x0a, 0x0e, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x43, 0x4d, 0x45, 0x55, + 0x73, 0x65, 0x72, 0x12, 0x19, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, + 0x43, 0x4d, 0x45, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, + 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x3b, + 0x0a, 0x0e, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x43, 0x4d, 0x45, 0x55, 0x73, 0x65, 0x72, + 0x12, 0x19, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x43, 0x4d, 0x45, + 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x70, 0x62, + 0x2e, 0x52, 0x50, 0x43, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x41, 0x0a, 0x0e, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x43, 0x4d, 0x45, 0x55, 0x73, 0x65, 0x72, 0x73, 0x12, 0x19, 0x2e, + 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x63, 0x6d, 0x65, 0x55, 0x73, 0x65, 0x72, + 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, 0x44, + 0x0a, 0x0d, 0x6c, 0x69, 0x73, 0x74, 0x41, 0x43, 0x4d, 0x45, 0x55, 0x73, 0x65, 0x72, 0x73, 0x12, + 0x18, 0x2e, 0x70, 0x62, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x43, 0x4d, 0x45, 0x55, 0x73, 0x65, + 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x70, 0x62, 0x2e, 0x4c, + 0x69, 0x73, 0x74, 0x41, 0x43, 0x4d, 0x45, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x56, 0x0a, 0x13, 0x66, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, + 0x6c, 0x65, 0x64, 0x41, 0x43, 0x4d, 0x45, 0x55, 0x73, 0x65, 0x72, 0x12, 0x1e, 0x2e, 0x70, 0x62, + 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x41, 0x43, 0x4d, 0x45, + 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x70, 0x62, + 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x41, 0x43, 0x4d, 0x45, + 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x06, 0x5a, 0x04, + 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_service_acme_user_proto_rawDescOnce sync.Once + file_service_acme_user_proto_rawDescData = file_service_acme_user_proto_rawDesc +) + +func file_service_acme_user_proto_rawDescGZIP() []byte { + file_service_acme_user_proto_rawDescOnce.Do(func() { + file_service_acme_user_proto_rawDescData = protoimpl.X.CompressGZIP(file_service_acme_user_proto_rawDescData) + }) + return file_service_acme_user_proto_rawDescData +} + +var file_service_acme_user_proto_msgTypes = make([]protoimpl.MessageInfo, 9) +var file_service_acme_user_proto_goTypes = []interface{}{ + (*CreateACMEUserRequest)(nil), // 0: pb.CreateACMEUserRequest + (*CreateACMEUserResponse)(nil), // 1: pb.CreateACMEUserResponse + (*UpdateACMEUserRequest)(nil), // 2: pb.UpdateACMEUserRequest + (*DeleteACMEUserRequest)(nil), // 3: pb.DeleteACMEUserRequest + (*CountAcmeUsersRequest)(nil), // 4: pb.CountAcmeUsersRequest + (*ListACMEUsersRequest)(nil), // 5: pb.ListACMEUsersRequest + (*ListACMEUsersResponse)(nil), // 6: pb.ListACMEUsersResponse + (*FindEnabledACMEUserRequest)(nil), // 7: pb.FindEnabledACMEUserRequest + (*FindEnabledACMEUserResponse)(nil), // 8: pb.FindEnabledACMEUserResponse + (*ACMEUser)(nil), // 9: pb.ACMEUser + (*RPCSuccess)(nil), // 10: pb.RPCSuccess + (*RPCCountResponse)(nil), // 11: pb.RPCCountResponse +} +var file_service_acme_user_proto_depIdxs = []int32{ + 9, // 0: pb.ListACMEUsersResponse.acmeUsers:type_name -> pb.ACMEUser + 9, // 1: pb.FindEnabledACMEUserResponse.acmeUser:type_name -> pb.ACMEUser + 0, // 2: pb.ACMEUserService.createACMEUser:input_type -> pb.CreateACMEUserRequest + 2, // 3: pb.ACMEUserService.updateACMEUser:input_type -> pb.UpdateACMEUserRequest + 3, // 4: pb.ACMEUserService.deleteACMEUser:input_type -> pb.DeleteACMEUserRequest + 4, // 5: pb.ACMEUserService.countACMEUsers:input_type -> pb.CountAcmeUsersRequest + 5, // 6: pb.ACMEUserService.listACMEUsers:input_type -> pb.ListACMEUsersRequest + 7, // 7: pb.ACMEUserService.findEnabledACMEUser:input_type -> pb.FindEnabledACMEUserRequest + 1, // 8: pb.ACMEUserService.createACMEUser:output_type -> pb.CreateACMEUserResponse + 10, // 9: pb.ACMEUserService.updateACMEUser:output_type -> pb.RPCSuccess + 10, // 10: pb.ACMEUserService.deleteACMEUser:output_type -> pb.RPCSuccess + 11, // 11: pb.ACMEUserService.countACMEUsers:output_type -> pb.RPCCountResponse + 6, // 12: pb.ACMEUserService.listACMEUsers:output_type -> pb.ListACMEUsersResponse + 8, // 13: pb.ACMEUserService.findEnabledACMEUser:output_type -> pb.FindEnabledACMEUserResponse + 8, // [8:14] is the sub-list for method output_type + 2, // [2:8] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { file_service_acme_user_proto_init() } +func file_service_acme_user_proto_init() { + if File_service_acme_user_proto != nil { + return + } + file_rpc_messages_proto_init() + file_model_acme_user_proto_init() + if !protoimpl.UnsafeEnabled { + file_service_acme_user_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateACMEUserRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_acme_user_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateACMEUserResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_acme_user_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateACMEUserRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_acme_user_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteACMEUserRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_acme_user_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CountAcmeUsersRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_acme_user_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListACMEUsersRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_acme_user_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListACMEUsersResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_acme_user_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FindEnabledACMEUserRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_acme_user_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FindEnabledACMEUserResponse); 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_service_acme_user_proto_rawDesc, + NumEnums: 0, + NumMessages: 9, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_service_acme_user_proto_goTypes, + DependencyIndexes: file_service_acme_user_proto_depIdxs, + MessageInfos: file_service_acme_user_proto_msgTypes, + }.Build() + File_service_acme_user_proto = out.File + file_service_acme_user_proto_rawDesc = nil + file_service_acme_user_proto_goTypes = nil + file_service_acme_user_proto_depIdxs = nil +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConnInterface + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion6 + +// ACMEUserServiceClient is the client API for ACMEUserService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type ACMEUserServiceClient interface { + // 创建用户 + CreateACMEUser(ctx context.Context, in *CreateACMEUserRequest, opts ...grpc.CallOption) (*CreateACMEUserResponse, error) + // 修改用户 + UpdateACMEUser(ctx context.Context, in *UpdateACMEUserRequest, opts ...grpc.CallOption) (*RPCSuccess, error) + // 删除用户 + DeleteACMEUser(ctx context.Context, in *DeleteACMEUserRequest, opts ...grpc.CallOption) (*RPCSuccess, error) + // 计算用户数量 + CountACMEUsers(ctx context.Context, in *CountAcmeUsersRequest, opts ...grpc.CallOption) (*RPCCountResponse, error) + // 列出单页用户 + ListACMEUsers(ctx context.Context, in *ListACMEUsersRequest, opts ...grpc.CallOption) (*ListACMEUsersResponse, error) + // 查找单个用户 + FindEnabledACMEUser(ctx context.Context, in *FindEnabledACMEUserRequest, opts ...grpc.CallOption) (*FindEnabledACMEUserResponse, error) +} + +type aCMEUserServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewACMEUserServiceClient(cc grpc.ClientConnInterface) ACMEUserServiceClient { + return &aCMEUserServiceClient{cc} +} + +func (c *aCMEUserServiceClient) CreateACMEUser(ctx context.Context, in *CreateACMEUserRequest, opts ...grpc.CallOption) (*CreateACMEUserResponse, error) { + out := new(CreateACMEUserResponse) + err := c.cc.Invoke(ctx, "/pb.ACMEUserService/createACMEUser", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *aCMEUserServiceClient) UpdateACMEUser(ctx context.Context, in *UpdateACMEUserRequest, opts ...grpc.CallOption) (*RPCSuccess, error) { + out := new(RPCSuccess) + err := c.cc.Invoke(ctx, "/pb.ACMEUserService/updateACMEUser", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *aCMEUserServiceClient) DeleteACMEUser(ctx context.Context, in *DeleteACMEUserRequest, opts ...grpc.CallOption) (*RPCSuccess, error) { + out := new(RPCSuccess) + err := c.cc.Invoke(ctx, "/pb.ACMEUserService/deleteACMEUser", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *aCMEUserServiceClient) CountACMEUsers(ctx context.Context, in *CountAcmeUsersRequest, opts ...grpc.CallOption) (*RPCCountResponse, error) { + out := new(RPCCountResponse) + err := c.cc.Invoke(ctx, "/pb.ACMEUserService/countACMEUsers", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *aCMEUserServiceClient) ListACMEUsers(ctx context.Context, in *ListACMEUsersRequest, opts ...grpc.CallOption) (*ListACMEUsersResponse, error) { + out := new(ListACMEUsersResponse) + err := c.cc.Invoke(ctx, "/pb.ACMEUserService/listACMEUsers", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *aCMEUserServiceClient) FindEnabledACMEUser(ctx context.Context, in *FindEnabledACMEUserRequest, opts ...grpc.CallOption) (*FindEnabledACMEUserResponse, error) { + out := new(FindEnabledACMEUserResponse) + err := c.cc.Invoke(ctx, "/pb.ACMEUserService/findEnabledACMEUser", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// ACMEUserServiceServer is the server API for ACMEUserService service. +type ACMEUserServiceServer interface { + // 创建用户 + CreateACMEUser(context.Context, *CreateACMEUserRequest) (*CreateACMEUserResponse, error) + // 修改用户 + UpdateACMEUser(context.Context, *UpdateACMEUserRequest) (*RPCSuccess, error) + // 删除用户 + DeleteACMEUser(context.Context, *DeleteACMEUserRequest) (*RPCSuccess, error) + // 计算用户数量 + CountACMEUsers(context.Context, *CountAcmeUsersRequest) (*RPCCountResponse, error) + // 列出单页用户 + ListACMEUsers(context.Context, *ListACMEUsersRequest) (*ListACMEUsersResponse, error) + // 查找单个用户 + FindEnabledACMEUser(context.Context, *FindEnabledACMEUserRequest) (*FindEnabledACMEUserResponse, error) +} + +// UnimplementedACMEUserServiceServer can be embedded to have forward compatible implementations. +type UnimplementedACMEUserServiceServer struct { +} + +func (*UnimplementedACMEUserServiceServer) CreateACMEUser(context.Context, *CreateACMEUserRequest) (*CreateACMEUserResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateACMEUser not implemented") +} +func (*UnimplementedACMEUserServiceServer) UpdateACMEUser(context.Context, *UpdateACMEUserRequest) (*RPCSuccess, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateACMEUser not implemented") +} +func (*UnimplementedACMEUserServiceServer) DeleteACMEUser(context.Context, *DeleteACMEUserRequest) (*RPCSuccess, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteACMEUser not implemented") +} +func (*UnimplementedACMEUserServiceServer) CountACMEUsers(context.Context, *CountAcmeUsersRequest) (*RPCCountResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CountACMEUsers not implemented") +} +func (*UnimplementedACMEUserServiceServer) ListACMEUsers(context.Context, *ListACMEUsersRequest) (*ListACMEUsersResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListACMEUsers not implemented") +} +func (*UnimplementedACMEUserServiceServer) FindEnabledACMEUser(context.Context, *FindEnabledACMEUserRequest) (*FindEnabledACMEUserResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method FindEnabledACMEUser not implemented") +} + +func RegisterACMEUserServiceServer(s *grpc.Server, srv ACMEUserServiceServer) { + s.RegisterService(&_ACMEUserService_serviceDesc, srv) +} + +func _ACMEUserService_CreateACMEUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateACMEUserRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ACMEUserServiceServer).CreateACMEUser(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.ACMEUserService/CreateACMEUser", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ACMEUserServiceServer).CreateACMEUser(ctx, req.(*CreateACMEUserRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ACMEUserService_UpdateACMEUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateACMEUserRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ACMEUserServiceServer).UpdateACMEUser(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.ACMEUserService/UpdateACMEUser", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ACMEUserServiceServer).UpdateACMEUser(ctx, req.(*UpdateACMEUserRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ACMEUserService_DeleteACMEUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteACMEUserRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ACMEUserServiceServer).DeleteACMEUser(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.ACMEUserService/DeleteACMEUser", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ACMEUserServiceServer).DeleteACMEUser(ctx, req.(*DeleteACMEUserRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ACMEUserService_CountACMEUsers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CountAcmeUsersRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ACMEUserServiceServer).CountACMEUsers(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.ACMEUserService/CountACMEUsers", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ACMEUserServiceServer).CountACMEUsers(ctx, req.(*CountAcmeUsersRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ACMEUserService_ListACMEUsers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListACMEUsersRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ACMEUserServiceServer).ListACMEUsers(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.ACMEUserService/ListACMEUsers", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ACMEUserServiceServer).ListACMEUsers(ctx, req.(*ListACMEUsersRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ACMEUserService_FindEnabledACMEUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(FindEnabledACMEUserRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ACMEUserServiceServer).FindEnabledACMEUser(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.ACMEUserService/FindEnabledACMEUser", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ACMEUserServiceServer).FindEnabledACMEUser(ctx, req.(*FindEnabledACMEUserRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _ACMEUserService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "pb.ACMEUserService", + HandlerType: (*ACMEUserServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "createACMEUser", + Handler: _ACMEUserService_CreateACMEUser_Handler, + }, + { + MethodName: "updateACMEUser", + Handler: _ACMEUserService_UpdateACMEUser_Handler, + }, + { + MethodName: "deleteACMEUser", + Handler: _ACMEUserService_DeleteACMEUser_Handler, + }, + { + MethodName: "countACMEUsers", + Handler: _ACMEUserService_CountACMEUsers_Handler, + }, + { + MethodName: "listACMEUsers", + Handler: _ACMEUserService_ListACMEUsers_Handler, + }, + { + MethodName: "findEnabledACMEUser", + Handler: _ACMEUserService_FindEnabledACMEUser_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "service_acme_user.proto", +} diff --git a/pkg/rpc/pb/service_ssl_cert.pb.go b/pkg/rpc/pb/service_ssl_cert.pb.go index 04272dc..434bf2f 100644 --- a/pkg/rpc/pb/service_ssl_cert.pb.go +++ b/pkg/rpc/pb/service_ssl_cert.pb.go @@ -706,6 +706,229 @@ func (x *ListSSLCertsResponse) GetCertsJSON() []byte { return nil } +// 计算某个ACME用户生成的证书数量 +type CountSSLCertsWithACMEUserIdRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + AcmeUserId int64 `protobuf:"varint,1,opt,name=acmeUserId,proto3" json:"acmeUserId,omitempty"` +} + +func (x *CountSSLCertsWithACMEUserIdRequest) Reset() { + *x = CountSSLCertsWithACMEUserIdRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_service_ssl_cert_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CountSSLCertsWithACMEUserIdRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CountSSLCertsWithACMEUserIdRequest) ProtoMessage() {} + +func (x *CountSSLCertsWithACMEUserIdRequest) ProtoReflect() protoreflect.Message { + mi := &file_service_ssl_cert_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CountSSLCertsWithACMEUserIdRequest.ProtoReflect.Descriptor instead. +func (*CountSSLCertsWithACMEUserIdRequest) Descriptor() ([]byte, []int) { + return file_service_ssl_cert_proto_rawDescGZIP(), []int{9} +} + +func (x *CountSSLCertsWithACMEUserIdRequest) GetAcmeUserId() int64 { + if x != nil { + return x.AcmeUserId + } + return 0 +} + +// 计算所有某个管理员/用户下所有的ACME用户生成的证书 +type CountAllSSLCertsWithACMERequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + AdminId int64 `protobuf:"varint,1,opt,name=adminId,proto3" json:"adminId,omitempty"` + UserId int64 `protobuf:"varint,2,opt,name=userId,proto3" json:"userId,omitempty"` +} + +func (x *CountAllSSLCertsWithACMERequest) Reset() { + *x = CountAllSSLCertsWithACMERequest{} + if protoimpl.UnsafeEnabled { + mi := &file_service_ssl_cert_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CountAllSSLCertsWithACMERequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CountAllSSLCertsWithACMERequest) ProtoMessage() {} + +func (x *CountAllSSLCertsWithACMERequest) ProtoReflect() protoreflect.Message { + mi := &file_service_ssl_cert_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 CountAllSSLCertsWithACMERequest.ProtoReflect.Descriptor instead. +func (*CountAllSSLCertsWithACMERequest) Descriptor() ([]byte, []int) { + return file_service_ssl_cert_proto_rawDescGZIP(), []int{10} +} + +func (x *CountAllSSLCertsWithACMERequest) GetAdminId() int64 { + if x != nil { + return x.AdminId + } + return 0 +} + +func (x *CountAllSSLCertsWithACMERequest) GetUserId() int64 { + if x != nil { + return x.UserId + } + return 0 +} + +// 列出单个管理员/用户下所有的ACME用户生成的证书 +type ListSSLCertsWithACMERequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + AdminId int64 `protobuf:"varint,1,opt,name=adminId,proto3" json:"adminId,omitempty"` + UserId int64 `protobuf:"varint,2,opt,name=userId,proto3" json:"userId,omitempty"` + Offset int64 `protobuf:"varint,3,opt,name=offset,proto3" json:"offset,omitempty"` + Size int64 `protobuf:"varint,4,opt,name=size,proto3" json:"size,omitempty"` +} + +func (x *ListSSLCertsWithACMERequest) Reset() { + *x = ListSSLCertsWithACMERequest{} + if protoimpl.UnsafeEnabled { + mi := &file_service_ssl_cert_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListSSLCertsWithACMERequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListSSLCertsWithACMERequest) ProtoMessage() {} + +func (x *ListSSLCertsWithACMERequest) ProtoReflect() protoreflect.Message { + mi := &file_service_ssl_cert_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 ListSSLCertsWithACMERequest.ProtoReflect.Descriptor instead. +func (*ListSSLCertsWithACMERequest) Descriptor() ([]byte, []int) { + return file_service_ssl_cert_proto_rawDescGZIP(), []int{11} +} + +func (x *ListSSLCertsWithACMERequest) GetAdminId() int64 { + if x != nil { + return x.AdminId + } + return 0 +} + +func (x *ListSSLCertsWithACMERequest) GetUserId() int64 { + if x != nil { + return x.UserId + } + return 0 +} + +func (x *ListSSLCertsWithACMERequest) GetOffset() int64 { + if x != nil { + return x.Offset + } + return 0 +} + +func (x *ListSSLCertsWithACMERequest) GetSize() int64 { + if x != nil { + return x.Size + } + return 0 +} + +type ListSSLCertsWithACMEResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + CertsJSON []byte `protobuf:"bytes,1,opt,name=certsJSON,proto3" json:"certsJSON,omitempty"` +} + +func (x *ListSSLCertsWithACMEResponse) Reset() { + *x = ListSSLCertsWithACMEResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_service_ssl_cert_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListSSLCertsWithACMEResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListSSLCertsWithACMEResponse) ProtoMessage() {} + +func (x *ListSSLCertsWithACMEResponse) ProtoReflect() protoreflect.Message { + mi := &file_service_ssl_cert_proto_msgTypes[12] + 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 ListSSLCertsWithACMEResponse.ProtoReflect.Descriptor instead. +func (*ListSSLCertsWithACMEResponse) Descriptor() ([]byte, []int) { + return file_service_ssl_cert_proto_rawDescGZIP(), []int{12} +} + +func (x *ListSSLCertsWithACMEResponse) GetCertsJSON() []byte { + if x != nil { + return x.CertsJSON + } + return nil +} + var File_service_ssl_cert_proto protoreflect.FileDescriptor var file_service_ssl_cert_proto_rawDesc = []byte{ @@ -796,35 +1019,73 @@ var file_service_ssl_cert_proto_rawDesc = []byte{ 0x73, 0x74, 0x53, 0x53, 0x4c, 0x43, 0x65, 0x72, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x65, 0x72, 0x74, 0x73, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x63, 0x65, 0x72, 0x74, 0x73, 0x4a, 0x53, 0x4f, 0x4e, - 0x32, 0xb6, 0x03, 0x0a, 0x0e, 0x53, 0x53, 0x4c, 0x43, 0x65, 0x72, 0x74, 0x53, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x12, 0x44, 0x0a, 0x0d, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x53, 0x4c, - 0x43, 0x65, 0x72, 0x74, 0x12, 0x18, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x53, 0x53, 0x4c, 0x43, 0x65, 0x72, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, - 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x53, 0x4c, 0x43, 0x65, 0x72, - 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x0d, 0x75, 0x70, 0x64, + 0x22, 0x44, 0x0a, 0x22, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x53, 0x4c, 0x43, 0x65, 0x72, 0x74, + 0x73, 0x57, 0x69, 0x74, 0x68, 0x41, 0x43, 0x4d, 0x45, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x63, 0x6d, 0x65, 0x55, 0x73, + 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x61, 0x63, 0x6d, 0x65, + 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x22, 0x53, 0x0a, 0x1f, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x41, + 0x6c, 0x6c, 0x53, 0x53, 0x4c, 0x43, 0x65, 0x72, 0x74, 0x73, 0x57, 0x69, 0x74, 0x68, 0x41, 0x43, + 0x4d, 0x45, 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, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x22, 0x7b, 0x0a, 0x1b, 0x4c, + 0x69, 0x73, 0x74, 0x53, 0x53, 0x4c, 0x43, 0x65, 0x72, 0x74, 0x73, 0x57, 0x69, 0x74, 0x68, 0x41, + 0x43, 0x4d, 0x45, 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, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, + 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x6f, 0x66, + 0x66, 0x73, 0x65, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x22, 0x3c, 0x0a, 0x1c, 0x4c, 0x69, 0x73, 0x74, + 0x53, 0x53, 0x4c, 0x43, 0x65, 0x72, 0x74, 0x73, 0x57, 0x69, 0x74, 0x68, 0x41, 0x43, 0x4d, 0x45, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x65, 0x72, 0x74, + 0x73, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x63, 0x65, 0x72, + 0x74, 0x73, 0x4a, 0x53, 0x4f, 0x4e, 0x32, 0xc5, 0x05, 0x0a, 0x0e, 0x53, 0x53, 0x4c, 0x43, 0x65, + 0x72, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x44, 0x0a, 0x0d, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x53, 0x4c, 0x43, 0x65, 0x72, 0x74, 0x12, 0x18, 0x2e, 0x70, 0x62, 0x2e, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x53, 0x4c, 0x43, 0x65, 0x72, 0x74, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x53, 0x75, 0x63, - 0x63, 0x65, 0x73, 0x73, 0x12, 0x39, 0x0a, 0x0d, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x53, - 0x4c, 0x43, 0x65, 0x72, 0x74, 0x12, 0x18, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, - 0x65, 0x53, 0x53, 0x4c, 0x43, 0x65, 0x72, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, - 0x65, 0x0a, 0x18, 0x66, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x53, 0x53, - 0x4c, 0x43, 0x65, 0x72, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x23, 0x2e, 0x70, 0x62, - 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x53, 0x53, 0x4c, 0x43, - 0x65, 0x72, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x24, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, - 0x64, 0x53, 0x53, 0x4c, 0x43, 0x65, 0x72, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3e, 0x0a, 0x0d, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x53, - 0x53, 0x4c, 0x43, 0x65, 0x72, 0x74, 0x73, 0x12, 0x17, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x75, - 0x6e, 0x74, 0x53, 0x53, 0x4c, 0x43, 0x65, 0x72, 0x74, 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, 0x41, 0x0a, 0x0c, 0x6c, 0x69, 0x73, 0x74, 0x53, 0x53, - 0x4c, 0x43, 0x65, 0x72, 0x74, 0x73, 0x12, 0x17, 0x2e, 0x70, 0x62, 0x2e, 0x4c, 0x69, 0x73, 0x74, - 0x53, 0x53, 0x4c, 0x43, 0x65, 0x72, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x18, 0x2e, 0x70, 0x62, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x53, 0x4c, 0x43, 0x65, 0x72, 0x74, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, - 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x53, 0x4c, 0x43, 0x65, 0x72, 0x74, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x53, 0x53, 0x4c, 0x43, 0x65, 0x72, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x39, 0x0a, 0x0d, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x53, 0x4c, 0x43, 0x65, 0x72, 0x74, + 0x12, 0x18, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x53, 0x4c, 0x43, + 0x65, 0x72, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x70, 0x62, 0x2e, + 0x52, 0x50, 0x43, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x39, 0x0a, 0x0d, 0x64, 0x65, + 0x6c, 0x65, 0x74, 0x65, 0x53, 0x53, 0x4c, 0x43, 0x65, 0x72, 0x74, 0x12, 0x18, 0x2e, 0x70, 0x62, + 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x53, 0x4c, 0x43, 0x65, 0x72, 0x74, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x53, 0x75, + 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x65, 0x0a, 0x18, 0x66, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, + 0x62, 0x6c, 0x65, 0x64, 0x53, 0x53, 0x4c, 0x43, 0x65, 0x72, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x12, 0x23, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, + 0x65, 0x64, 0x53, 0x53, 0x4c, 0x43, 0x65, 0x72, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, + 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x53, 0x53, 0x4c, 0x43, 0x65, 0x72, 0x74, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3e, 0x0a, 0x0d, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x53, 0x4c, 0x43, 0x65, 0x72, 0x74, 0x73, 0x12, 0x17, 0x2e, + 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x53, 0x4c, 0x43, 0x65, 0x72, 0x74, 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, 0x41, 0x0a, 0x0c, + 0x6c, 0x69, 0x73, 0x74, 0x53, 0x53, 0x4c, 0x43, 0x65, 0x72, 0x74, 0x73, 0x12, 0x17, 0x2e, 0x70, + 0x62, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x53, 0x4c, 0x43, 0x65, 0x72, 0x74, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x70, 0x62, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, + 0x53, 0x4c, 0x43, 0x65, 0x72, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x5b, 0x0a, 0x1b, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x53, 0x4c, 0x43, 0x65, 0x72, 0x74, 0x73, + 0x57, 0x69, 0x74, 0x68, 0x41, 0x43, 0x4d, 0x45, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x26, + 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x53, 0x4c, 0x43, 0x65, 0x72, 0x74, + 0x73, 0x57, 0x69, 0x74, 0x68, 0x41, 0x43, 0x4d, 0x45, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 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, 0x55, 0x0a, 0x18, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x53, 0x53, 0x4c, 0x43, 0x65, 0x72, 0x74, 0x73, + 0x57, 0x69, 0x74, 0x68, 0x41, 0x43, 0x4d, 0x45, 0x12, 0x23, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, + 0x75, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x53, 0x53, 0x4c, 0x43, 0x65, 0x72, 0x74, 0x73, 0x57, 0x69, + 0x74, 0x68, 0x41, 0x43, 0x4d, 0x45, 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, 0x59, 0x0a, 0x14, 0x6c, 0x69, 0x73, 0x74, 0x53, 0x53, 0x4c, 0x43, 0x65, + 0x72, 0x74, 0x73, 0x57, 0x69, 0x74, 0x68, 0x41, 0x43, 0x4d, 0x45, 0x12, 0x1f, 0x2e, 0x70, 0x62, + 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x53, 0x4c, 0x43, 0x65, 0x72, 0x74, 0x73, 0x57, 0x69, 0x74, + 0x68, 0x41, 0x43, 0x4d, 0x45, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x70, + 0x62, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x53, 0x4c, 0x43, 0x65, 0x72, 0x74, 0x73, 0x57, 0x69, + 0x74, 0x68, 0x41, 0x43, 0x4d, 0x45, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x06, + 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -839,19 +1100,23 @@ func file_service_ssl_cert_proto_rawDescGZIP() []byte { return file_service_ssl_cert_proto_rawDescData } -var file_service_ssl_cert_proto_msgTypes = make([]protoimpl.MessageInfo, 9) +var file_service_ssl_cert_proto_msgTypes = make([]protoimpl.MessageInfo, 13) var file_service_ssl_cert_proto_goTypes = []interface{}{ - (*CreateSSLCertRequest)(nil), // 0: pb.CreateSSLCertRequest - (*CreateSSLCertResponse)(nil), // 1: pb.CreateSSLCertResponse - (*UpdateSSLCertRequest)(nil), // 2: pb.UpdateSSLCertRequest - (*FindEnabledSSLCertConfigRequest)(nil), // 3: pb.FindEnabledSSLCertConfigRequest - (*FindEnabledSSLCertConfigResponse)(nil), // 4: pb.FindEnabledSSLCertConfigResponse - (*DeleteSSLCertRequest)(nil), // 5: pb.DeleteSSLCertRequest - (*CountSSLCertRequest)(nil), // 6: pb.CountSSLCertRequest - (*ListSSLCertsRequest)(nil), // 7: pb.ListSSLCertsRequest - (*ListSSLCertsResponse)(nil), // 8: pb.ListSSLCertsResponse - (*RPCSuccess)(nil), // 9: pb.RPCSuccess - (*RPCCountResponse)(nil), // 10: pb.RPCCountResponse + (*CreateSSLCertRequest)(nil), // 0: pb.CreateSSLCertRequest + (*CreateSSLCertResponse)(nil), // 1: pb.CreateSSLCertResponse + (*UpdateSSLCertRequest)(nil), // 2: pb.UpdateSSLCertRequest + (*FindEnabledSSLCertConfigRequest)(nil), // 3: pb.FindEnabledSSLCertConfigRequest + (*FindEnabledSSLCertConfigResponse)(nil), // 4: pb.FindEnabledSSLCertConfigResponse + (*DeleteSSLCertRequest)(nil), // 5: pb.DeleteSSLCertRequest + (*CountSSLCertRequest)(nil), // 6: pb.CountSSLCertRequest + (*ListSSLCertsRequest)(nil), // 7: pb.ListSSLCertsRequest + (*ListSSLCertsResponse)(nil), // 8: pb.ListSSLCertsResponse + (*CountSSLCertsWithACMEUserIdRequest)(nil), // 9: pb.CountSSLCertsWithACMEUserIdRequest + (*CountAllSSLCertsWithACMERequest)(nil), // 10: pb.CountAllSSLCertsWithACMERequest + (*ListSSLCertsWithACMERequest)(nil), // 11: pb.ListSSLCertsWithACMERequest + (*ListSSLCertsWithACMEResponse)(nil), // 12: pb.ListSSLCertsWithACMEResponse + (*RPCSuccess)(nil), // 13: pb.RPCSuccess + (*RPCCountResponse)(nil), // 14: pb.RPCCountResponse } var file_service_ssl_cert_proto_depIdxs = []int32{ 0, // 0: pb.SSLCertService.createSSLCert:input_type -> pb.CreateSSLCertRequest @@ -860,14 +1125,20 @@ var file_service_ssl_cert_proto_depIdxs = []int32{ 3, // 3: pb.SSLCertService.findEnabledSSLCertConfig:input_type -> pb.FindEnabledSSLCertConfigRequest 6, // 4: pb.SSLCertService.countSSLCerts:input_type -> pb.CountSSLCertRequest 7, // 5: pb.SSLCertService.listSSLCerts:input_type -> pb.ListSSLCertsRequest - 1, // 6: pb.SSLCertService.createSSLCert:output_type -> pb.CreateSSLCertResponse - 9, // 7: pb.SSLCertService.updateSSLCert:output_type -> pb.RPCSuccess - 9, // 8: pb.SSLCertService.deleteSSLCert:output_type -> pb.RPCSuccess - 4, // 9: pb.SSLCertService.findEnabledSSLCertConfig:output_type -> pb.FindEnabledSSLCertConfigResponse - 10, // 10: pb.SSLCertService.countSSLCerts:output_type -> pb.RPCCountResponse - 8, // 11: pb.SSLCertService.listSSLCerts:output_type -> pb.ListSSLCertsResponse - 6, // [6:12] is the sub-list for method output_type - 0, // [0:6] is the sub-list for method input_type + 9, // 6: pb.SSLCertService.countSSLCertsWithACMEUserId:input_type -> pb.CountSSLCertsWithACMEUserIdRequest + 10, // 7: pb.SSLCertService.countAllSSLCertsWithACME:input_type -> pb.CountAllSSLCertsWithACMERequest + 11, // 8: pb.SSLCertService.listSSLCertsWithACME:input_type -> pb.ListSSLCertsWithACMERequest + 1, // 9: pb.SSLCertService.createSSLCert:output_type -> pb.CreateSSLCertResponse + 13, // 10: pb.SSLCertService.updateSSLCert:output_type -> pb.RPCSuccess + 13, // 11: pb.SSLCertService.deleteSSLCert:output_type -> pb.RPCSuccess + 4, // 12: pb.SSLCertService.findEnabledSSLCertConfig:output_type -> pb.FindEnabledSSLCertConfigResponse + 14, // 13: pb.SSLCertService.countSSLCerts:output_type -> pb.RPCCountResponse + 8, // 14: pb.SSLCertService.listSSLCerts:output_type -> pb.ListSSLCertsResponse + 14, // 15: pb.SSLCertService.countSSLCertsWithACMEUserId:output_type -> pb.RPCCountResponse + 14, // 16: pb.SSLCertService.countAllSSLCertsWithACME:output_type -> pb.RPCCountResponse + 12, // 17: pb.SSLCertService.listSSLCertsWithACME:output_type -> pb.ListSSLCertsWithACMEResponse + 9, // [9:18] is the sub-list for method output_type + 0, // [0:9] 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 @@ -988,6 +1259,54 @@ func file_service_ssl_cert_proto_init() { return nil } } + file_service_ssl_cert_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CountSSLCertsWithACMEUserIdRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_ssl_cert_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CountAllSSLCertsWithACMERequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_ssl_cert_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListSSLCertsWithACMERequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_ssl_cert_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListSSLCertsWithACMEResponse); 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{ @@ -995,7 +1314,7 @@ func file_service_ssl_cert_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_service_ssl_cert_proto_rawDesc, NumEnums: 0, - NumMessages: 9, + NumMessages: 13, NumExtensions: 0, NumServices: 1, }, @@ -1033,6 +1352,12 @@ type SSLCertServiceClient interface { CountSSLCerts(ctx context.Context, in *CountSSLCertRequest, opts ...grpc.CallOption) (*RPCCountResponse, error) // 列出单页匹配的Cert ListSSLCerts(ctx context.Context, in *ListSSLCertsRequest, opts ...grpc.CallOption) (*ListSSLCertsResponse, error) + // 计算某个ACME用户生成的证书数量 + CountSSLCertsWithACMEUserId(ctx context.Context, in *CountSSLCertsWithACMEUserIdRequest, opts ...grpc.CallOption) (*RPCCountResponse, error) + // 计算所有某个管理员/用户下所有的ACME用户生成的证书 + CountAllSSLCertsWithACME(ctx context.Context, in *CountAllSSLCertsWithACMERequest, opts ...grpc.CallOption) (*RPCCountResponse, error) + // 列出单个管理员/用户下所有的ACME用户生成的证书 + ListSSLCertsWithACME(ctx context.Context, in *ListSSLCertsWithACMERequest, opts ...grpc.CallOption) (*ListSSLCertsWithACMEResponse, error) } type sSLCertServiceClient struct { @@ -1097,6 +1422,33 @@ func (c *sSLCertServiceClient) ListSSLCerts(ctx context.Context, in *ListSSLCert return out, nil } +func (c *sSLCertServiceClient) CountSSLCertsWithACMEUserId(ctx context.Context, in *CountSSLCertsWithACMEUserIdRequest, opts ...grpc.CallOption) (*RPCCountResponse, error) { + out := new(RPCCountResponse) + err := c.cc.Invoke(ctx, "/pb.SSLCertService/countSSLCertsWithACMEUserId", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *sSLCertServiceClient) CountAllSSLCertsWithACME(ctx context.Context, in *CountAllSSLCertsWithACMERequest, opts ...grpc.CallOption) (*RPCCountResponse, error) { + out := new(RPCCountResponse) + err := c.cc.Invoke(ctx, "/pb.SSLCertService/countAllSSLCertsWithACME", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *sSLCertServiceClient) ListSSLCertsWithACME(ctx context.Context, in *ListSSLCertsWithACMERequest, opts ...grpc.CallOption) (*ListSSLCertsWithACMEResponse, error) { + out := new(ListSSLCertsWithACMEResponse) + err := c.cc.Invoke(ctx, "/pb.SSLCertService/listSSLCertsWithACME", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // SSLCertServiceServer is the server API for SSLCertService service. type SSLCertServiceServer interface { // 创建Cert @@ -1111,6 +1463,12 @@ type SSLCertServiceServer interface { CountSSLCerts(context.Context, *CountSSLCertRequest) (*RPCCountResponse, error) // 列出单页匹配的Cert ListSSLCerts(context.Context, *ListSSLCertsRequest) (*ListSSLCertsResponse, error) + // 计算某个ACME用户生成的证书数量 + CountSSLCertsWithACMEUserId(context.Context, *CountSSLCertsWithACMEUserIdRequest) (*RPCCountResponse, error) + // 计算所有某个管理员/用户下所有的ACME用户生成的证书 + CountAllSSLCertsWithACME(context.Context, *CountAllSSLCertsWithACMERequest) (*RPCCountResponse, error) + // 列出单个管理员/用户下所有的ACME用户生成的证书 + ListSSLCertsWithACME(context.Context, *ListSSLCertsWithACMERequest) (*ListSSLCertsWithACMEResponse, error) } // UnimplementedSSLCertServiceServer can be embedded to have forward compatible implementations. @@ -1135,6 +1493,15 @@ func (*UnimplementedSSLCertServiceServer) CountSSLCerts(context.Context, *CountS func (*UnimplementedSSLCertServiceServer) ListSSLCerts(context.Context, *ListSSLCertsRequest) (*ListSSLCertsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListSSLCerts not implemented") } +func (*UnimplementedSSLCertServiceServer) CountSSLCertsWithACMEUserId(context.Context, *CountSSLCertsWithACMEUserIdRequest) (*RPCCountResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CountSSLCertsWithACMEUserId not implemented") +} +func (*UnimplementedSSLCertServiceServer) CountAllSSLCertsWithACME(context.Context, *CountAllSSLCertsWithACMERequest) (*RPCCountResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CountAllSSLCertsWithACME not implemented") +} +func (*UnimplementedSSLCertServiceServer) ListSSLCertsWithACME(context.Context, *ListSSLCertsWithACMERequest) (*ListSSLCertsWithACMEResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListSSLCertsWithACME not implemented") +} func RegisterSSLCertServiceServer(s *grpc.Server, srv SSLCertServiceServer) { s.RegisterService(&_SSLCertService_serviceDesc, srv) @@ -1248,6 +1615,60 @@ func _SSLCertService_ListSSLCerts_Handler(srv interface{}, ctx context.Context, return interceptor(ctx, in, info, handler) } +func _SSLCertService_CountSSLCertsWithACMEUserId_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CountSSLCertsWithACMEUserIdRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SSLCertServiceServer).CountSSLCertsWithACMEUserId(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.SSLCertService/CountSSLCertsWithACMEUserId", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SSLCertServiceServer).CountSSLCertsWithACMEUserId(ctx, req.(*CountSSLCertsWithACMEUserIdRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _SSLCertService_CountAllSSLCertsWithACME_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CountAllSSLCertsWithACMERequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SSLCertServiceServer).CountAllSSLCertsWithACME(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.SSLCertService/CountAllSSLCertsWithACME", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SSLCertServiceServer).CountAllSSLCertsWithACME(ctx, req.(*CountAllSSLCertsWithACMERequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _SSLCertService_ListSSLCertsWithACME_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListSSLCertsWithACMERequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SSLCertServiceServer).ListSSLCertsWithACME(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.SSLCertService/ListSSLCertsWithACME", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SSLCertServiceServer).ListSSLCertsWithACME(ctx, req.(*ListSSLCertsWithACMERequest)) + } + return interceptor(ctx, in, info, handler) +} + var _SSLCertService_serviceDesc = grpc.ServiceDesc{ ServiceName: "pb.SSLCertService", HandlerType: (*SSLCertServiceServer)(nil), @@ -1276,6 +1697,18 @@ var _SSLCertService_serviceDesc = grpc.ServiceDesc{ MethodName: "listSSLCerts", Handler: _SSLCertService_ListSSLCerts_Handler, }, + { + MethodName: "countSSLCertsWithACMEUserId", + Handler: _SSLCertService_CountSSLCertsWithACMEUserId_Handler, + }, + { + MethodName: "countAllSSLCertsWithACME", + Handler: _SSLCertService_CountAllSSLCertsWithACME_Handler, + }, + { + MethodName: "listSSLCertsWithACME", + Handler: _SSLCertService_ListSSLCertsWithACME_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "service_ssl_cert.proto", diff --git a/pkg/rpc/protos/model_acme_user.proto b/pkg/rpc/protos/model_acme_user.proto new file mode 100644 index 0000000..e2cf5b6 --- /dev/null +++ b/pkg/rpc/protos/model_acme_user.proto @@ -0,0 +1,11 @@ +syntax = "proto3"; +option go_package = "./pb"; + +package pb; + +message ACMEUser { + int64 id = 1; + string email = 2; + string description = 3; + int64 createdAt = 4; +} \ No newline at end of file diff --git a/pkg/rpc/protos/service_acme_user.proto b/pkg/rpc/protos/service_acme_user.proto new file mode 100644 index 0000000..d77d989 --- /dev/null +++ b/pkg/rpc/protos/service_acme_user.proto @@ -0,0 +1,76 @@ +syntax = "proto3"; +option go_package = "./pb"; + +package pb; + +import "rpc_messages.proto"; +import "model_acme_user.proto"; + +// ACME用户相关服务 +service ACMEUserService { + // 创建用户 + rpc createACMEUser (CreateACMEUserRequest) returns (CreateACMEUserResponse); + + // 修改用户 + rpc updateACMEUser (UpdateACMEUserRequest) returns (RPCSuccess); + + // 删除用户 + rpc deleteACMEUser (DeleteACMEUserRequest) returns (RPCSuccess); + + // 计算用户数量 + rpc countACMEUsers (CountAcmeUsersRequest) returns (RPCCountResponse); + + // 列出单页用户 + rpc listACMEUsers (ListACMEUsersRequest) returns (ListACMEUsersResponse); + + // 查找单个用户 + rpc findEnabledACMEUser (FindEnabledACMEUserRequest) returns (FindEnabledACMEUserResponse); +} + +// 创建用户 +message CreateACMEUserRequest { + string email = 1; + string description = 2; +} + +message CreateACMEUserResponse { + int64 acmeUserId = 1; +} + +// 修改用户 +message UpdateACMEUserRequest { + int64 acmeUserId = 1; + string description = 2; +} + +// 删除用户 +message DeleteACMEUserRequest { + int64 acmeUserId = 1; +} + +// 计算用户数量 +message CountAcmeUsersRequest { + int64 adminId = 1; + int64 userId = 2; +} + +// 列出单页用户 +message ListACMEUsersRequest { + int64 adminId = 1; + int64 userId = 2; + int64 offset = 3; + int64 size = 4; +} + +message ListACMEUsersResponse { + repeated ACMEUser acmeUsers = 1; +} + +// 查找单个用户 +message FindEnabledACMEUserRequest { + int64 acmeUserId = 1; +} + +message FindEnabledACMEUserResponse { + ACMEUser acmeUser = 1; +} \ No newline at end of file diff --git a/pkg/rpc/protos/service_ssl_cert.proto b/pkg/rpc/protos/service_ssl_cert.proto index b01b8b6..962e6c2 100644 --- a/pkg/rpc/protos/service_ssl_cert.proto +++ b/pkg/rpc/protos/service_ssl_cert.proto @@ -23,6 +23,15 @@ service SSLCertService { // 列出单页匹配的Cert rpc listSSLCerts (ListSSLCertsRequest) returns (ListSSLCertsResponse); + + // 计算某个ACME用户生成的证书数量 + rpc countSSLCertsWithACMEUserId (CountSSLCertsWithACMEUserIdRequest) returns (RPCCountResponse); + + // 计算所有某个管理员/用户下所有的ACME用户生成的证书 + rpc countAllSSLCertsWithACME (CountAllSSLCertsWithACMERequest) returns (RPCCountResponse); + + // 列出单个管理员/用户下所有的ACME用户生成的证书 + rpc listSSLCertsWithACME (ListSSLCertsWithACMERequest) returns (ListSSLCertsWithACMEResponse); } // 创建Cert @@ -96,4 +105,27 @@ message ListSSLCertsRequest { message ListSSLCertsResponse { bytes certsJSON = 1; +} + +// 计算某个ACME用户生成的证书数量 +message CountSSLCertsWithACMEUserIdRequest { + int64 acmeUserId = 1; +} + +// 计算所有某个管理员/用户下所有的ACME用户生成的证书 +message CountAllSSLCertsWithACMERequest { + int64 adminId = 1; + int64 userId = 2; +} + +// 列出单个管理员/用户下所有的ACME用户生成的证书 +message ListSSLCertsWithACMERequest { + int64 adminId = 1; + int64 userId = 2; + int64 offset = 3; + int64 size = 4; +} + +message ListSSLCertsWithACMEResponse { + bytes certsJSON = 1; } \ No newline at end of file