[SSL证书]实现对ACME任务的增删改查

This commit is contained in:
刘祥超
2020-11-25 21:20:10 +08:00
parent 3b921809fe
commit 4fc7f4e3e8
12 changed files with 2807 additions and 737 deletions

View File

@@ -506,6 +506,109 @@ func (x *FindEnabledACMEUserResponse) GetAcmeUser() *ACMEUser {
return nil
}
// 查找所有用户
type FindAllACMEUsersRequest 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 *FindAllACMEUsersRequest) Reset() {
*x = FindAllACMEUsersRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_service_acme_user_proto_msgTypes[9]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *FindAllACMEUsersRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*FindAllACMEUsersRequest) ProtoMessage() {}
func (x *FindAllACMEUsersRequest) ProtoReflect() protoreflect.Message {
mi := &file_service_acme_user_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 FindAllACMEUsersRequest.ProtoReflect.Descriptor instead.
func (*FindAllACMEUsersRequest) Descriptor() ([]byte, []int) {
return file_service_acme_user_proto_rawDescGZIP(), []int{9}
}
func (x *FindAllACMEUsersRequest) GetAdminId() int64 {
if x != nil {
return x.AdminId
}
return 0
}
func (x *FindAllACMEUsersRequest) GetUserId() int64 {
if x != nil {
return x.UserId
}
return 0
}
type FindAllACMEUsersResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
AcmeUsers []*ACMEUser `protobuf:"bytes,1,rep,name=acmeUsers,proto3" json:"acmeUsers,omitempty"`
}
func (x *FindAllACMEUsersResponse) Reset() {
*x = FindAllACMEUsersResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_service_acme_user_proto_msgTypes[10]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *FindAllACMEUsersResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*FindAllACMEUsersResponse) ProtoMessage() {}
func (x *FindAllACMEUsersResponse) ProtoReflect() protoreflect.Message {
mi := &file_service_acme_user_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 FindAllACMEUsersResponse.ProtoReflect.Descriptor instead.
func (*FindAllACMEUsersResponse) Descriptor() ([]byte, []int) {
return file_service_acme_user_proto_rawDescGZIP(), []int{10}
}
func (x *FindAllACMEUsersResponse) GetAcmeUsers() []*ACMEUser {
if x != nil {
return x.AcmeUsers
}
return nil
}
var File_service_acme_user_proto protoreflect.FileDescriptor
var file_service_acme_user_proto_rawDesc = []byte{
@@ -556,35 +659,49 @@ var file_service_acme_user_proto_rawDesc = []byte{
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,
0x55, 0x73, 0x65, 0x72, 0x22, 0x4b, 0x0a, 0x17, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 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, 0x22, 0x46, 0x0a, 0x18, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 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, 0x32, 0x84, 0x04, 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,
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,
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, 0x12, 0x4d, 0x0a, 0x10, 0x66, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x41, 0x43, 0x4d, 0x45,
0x55, 0x73, 0x65, 0x72, 0x73, 0x12, 0x1b, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x41,
0x6c, 0x6c, 0x41, 0x43, 0x4d, 0x45, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x41,
0x43, 0x4d, 0x45, 0x55, 0x73, 0x65, 0x72, 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,
}
var (
@@ -599,7 +716,7 @@ func file_service_acme_user_proto_rawDescGZIP() []byte {
return file_service_acme_user_proto_rawDescData
}
var file_service_acme_user_proto_msgTypes = make([]protoimpl.MessageInfo, 9)
var file_service_acme_user_proto_msgTypes = make([]protoimpl.MessageInfo, 11)
var file_service_acme_user_proto_goTypes = []interface{}{
(*CreateACMEUserRequest)(nil), // 0: pb.CreateACMEUserRequest
(*CreateACMEUserResponse)(nil), // 1: pb.CreateACMEUserResponse
@@ -610,30 +727,35 @@ var file_service_acme_user_proto_goTypes = []interface{}{
(*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
(*FindAllACMEUsersRequest)(nil), // 9: pb.FindAllACMEUsersRequest
(*FindAllACMEUsersResponse)(nil), // 10: pb.FindAllACMEUsersResponse
(*ACMEUser)(nil), // 11: pb.ACMEUser
(*RPCSuccess)(nil), // 12: pb.RPCSuccess
(*RPCCountResponse)(nil), // 13: 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
11, // 0: pb.ListACMEUsersResponse.acmeUsers:type_name -> pb.ACMEUser
11, // 1: pb.FindEnabledACMEUserResponse.acmeUser:type_name -> pb.ACMEUser
11, // 2: pb.FindAllACMEUsersResponse.acmeUsers:type_name -> pb.ACMEUser
0, // 3: pb.ACMEUserService.createACMEUser:input_type -> pb.CreateACMEUserRequest
2, // 4: pb.ACMEUserService.updateACMEUser:input_type -> pb.UpdateACMEUserRequest
3, // 5: pb.ACMEUserService.deleteACMEUser:input_type -> pb.DeleteACMEUserRequest
4, // 6: pb.ACMEUserService.countACMEUsers:input_type -> pb.CountAcmeUsersRequest
5, // 7: pb.ACMEUserService.listACMEUsers:input_type -> pb.ListACMEUsersRequest
7, // 8: pb.ACMEUserService.findEnabledACMEUser:input_type -> pb.FindEnabledACMEUserRequest
9, // 9: pb.ACMEUserService.findAllACMEUsers:input_type -> pb.FindAllACMEUsersRequest
1, // 10: pb.ACMEUserService.createACMEUser:output_type -> pb.CreateACMEUserResponse
12, // 11: pb.ACMEUserService.updateACMEUser:output_type -> pb.RPCSuccess
12, // 12: pb.ACMEUserService.deleteACMEUser:output_type -> pb.RPCSuccess
13, // 13: pb.ACMEUserService.countACMEUsers:output_type -> pb.RPCCountResponse
6, // 14: pb.ACMEUserService.listACMEUsers:output_type -> pb.ListACMEUsersResponse
8, // 15: pb.ACMEUserService.findEnabledACMEUser:output_type -> pb.FindEnabledACMEUserResponse
10, // 16: pb.ACMEUserService.findAllACMEUsers:output_type -> pb.FindAllACMEUsersResponse
10, // [10:17] is the sub-list for method output_type
3, // [3:10] is the sub-list for method input_type
3, // [3:3] is the sub-list for extension type_name
3, // [3:3] is the sub-list for extension extendee
0, // [0:3] is the sub-list for field type_name
}
func init() { file_service_acme_user_proto_init() }
@@ -752,6 +874,30 @@ func file_service_acme_user_proto_init() {
return nil
}
}
file_service_acme_user_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*FindAllACMEUsersRequest); 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[10].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*FindAllACMEUsersResponse); 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{
@@ -759,7 +905,7 @@ func file_service_acme_user_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_service_acme_user_proto_rawDesc,
NumEnums: 0,
NumMessages: 9,
NumMessages: 11,
NumExtensions: 0,
NumServices: 1,
},
@@ -797,6 +943,8 @@ type ACMEUserServiceClient interface {
ListACMEUsers(ctx context.Context, in *ListACMEUsersRequest, opts ...grpc.CallOption) (*ListACMEUsersResponse, error)
// 查找单个用户
FindEnabledACMEUser(ctx context.Context, in *FindEnabledACMEUserRequest, opts ...grpc.CallOption) (*FindEnabledACMEUserResponse, error)
// 查找所有用户
FindAllACMEUsers(ctx context.Context, in *FindAllACMEUsersRequest, opts ...grpc.CallOption) (*FindAllACMEUsersResponse, error)
}
type aCMEUserServiceClient struct {
@@ -861,6 +1009,15 @@ func (c *aCMEUserServiceClient) FindEnabledACMEUser(ctx context.Context, in *Fin
return out, nil
}
func (c *aCMEUserServiceClient) FindAllACMEUsers(ctx context.Context, in *FindAllACMEUsersRequest, opts ...grpc.CallOption) (*FindAllACMEUsersResponse, error) {
out := new(FindAllACMEUsersResponse)
err := c.cc.Invoke(ctx, "/pb.ACMEUserService/findAllACMEUsers", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// ACMEUserServiceServer is the server API for ACMEUserService service.
type ACMEUserServiceServer interface {
// 创建用户
@@ -875,6 +1032,8 @@ type ACMEUserServiceServer interface {
ListACMEUsers(context.Context, *ListACMEUsersRequest) (*ListACMEUsersResponse, error)
// 查找单个用户
FindEnabledACMEUser(context.Context, *FindEnabledACMEUserRequest) (*FindEnabledACMEUserResponse, error)
// 查找所有用户
FindAllACMEUsers(context.Context, *FindAllACMEUsersRequest) (*FindAllACMEUsersResponse, error)
}
// UnimplementedACMEUserServiceServer can be embedded to have forward compatible implementations.
@@ -899,6 +1058,9 @@ func (*UnimplementedACMEUserServiceServer) ListACMEUsers(context.Context, *ListA
func (*UnimplementedACMEUserServiceServer) FindEnabledACMEUser(context.Context, *FindEnabledACMEUserRequest) (*FindEnabledACMEUserResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method FindEnabledACMEUser not implemented")
}
func (*UnimplementedACMEUserServiceServer) FindAllACMEUsers(context.Context, *FindAllACMEUsersRequest) (*FindAllACMEUsersResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method FindAllACMEUsers not implemented")
}
func RegisterACMEUserServiceServer(s *grpc.Server, srv ACMEUserServiceServer) {
s.RegisterService(&_ACMEUserService_serviceDesc, srv)
@@ -1012,6 +1174,24 @@ func _ACMEUserService_FindEnabledACMEUser_Handler(srv interface{}, ctx context.C
return interceptor(ctx, in, info, handler)
}
func _ACMEUserService_FindAllACMEUsers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(FindAllACMEUsersRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ACMEUserServiceServer).FindAllACMEUsers(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/pb.ACMEUserService/FindAllACMEUsers",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ACMEUserServiceServer).FindAllACMEUsers(ctx, req.(*FindAllACMEUsersRequest))
}
return interceptor(ctx, in, info, handler)
}
var _ACMEUserService_serviceDesc = grpc.ServiceDesc{
ServiceName: "pb.ACMEUserService",
HandlerType: (*ACMEUserServiceServer)(nil),
@@ -1040,6 +1220,10 @@ var _ACMEUserService_serviceDesc = grpc.ServiceDesc{
MethodName: "findEnabledACMEUser",
Handler: _ACMEUserService_FindEnabledACMEUser_Handler,
},
{
MethodName: "findAllACMEUsers",
Handler: _ACMEUserService_FindAllACMEUsers_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "service_acme_user.proto",