Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterUserCenterHTTPServer(s *http.Server, srv UserCenterHTTPServer)
- func RegisterUserCenterServer(s grpc.ServiceRegistrar, srv UserCenterServer)
- type CreateUserRequest
- func (*CreateUserRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CreateUserRequest) GetEmail() string
- func (x *CreateUserRequest) GetNickname() string
- func (x *CreateUserRequest) GetPassword() string
- func (x *CreateUserRequest) GetPhone() string
- func (x *CreateUserRequest) GetUsername() string
- func (*CreateUserRequest) ProtoMessage()
- func (x *CreateUserRequest) ProtoReflect() protoreflect.Message
- func (x *CreateUserRequest) Reset()
- func (x *CreateUserRequest) String() string
- func (m *CreateUserRequest) Validate() error
- func (m *CreateUserRequest) ValidateAll() error
- type CreateUserRequestMultiError
- type CreateUserRequestValidationError
- func (e CreateUserRequestValidationError) Cause() error
- func (e CreateUserRequestValidationError) Error() string
- func (e CreateUserRequestValidationError) ErrorName() string
- func (e CreateUserRequestValidationError) Field() string
- func (e CreateUserRequestValidationError) Key() bool
- func (e CreateUserRequestValidationError) Reason() string
- type DeleteUserRequest
- func (*DeleteUserRequest) Descriptor() ([]byte, []int)deprecated
- func (x *DeleteUserRequest) GetUsername() string
- func (*DeleteUserRequest) ProtoMessage()
- func (x *DeleteUserRequest) ProtoReflect() protoreflect.Message
- func (x *DeleteUserRequest) Reset()
- func (x *DeleteUserRequest) String() string
- func (m *DeleteUserRequest) Validate() error
- func (m *DeleteUserRequest) ValidateAll() error
- type DeleteUserRequestMultiError
- type DeleteUserRequestValidationError
- func (e DeleteUserRequestValidationError) Cause() error
- func (e DeleteUserRequestValidationError) Error() string
- func (e DeleteUserRequestValidationError) ErrorName() string
- func (e DeleteUserRequestValidationError) Field() string
- func (e DeleteUserRequestValidationError) Key() bool
- func (e DeleteUserRequestValidationError) Reason() string
- type ListUserRequest
- func (*ListUserRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ListUserRequest) GetLimit() int64
- func (x *ListUserRequest) GetOffset() int64
- func (*ListUserRequest) ProtoMessage()
- func (x *ListUserRequest) ProtoReflect() protoreflect.Message
- func (x *ListUserRequest) Reset()
- func (x *ListUserRequest) String() string
- func (m *ListUserRequest) Validate() error
- func (m *ListUserRequest) ValidateAll() error
- type ListUserRequestMultiError
- type ListUserRequestValidationError
- func (e ListUserRequestValidationError) Cause() error
- func (e ListUserRequestValidationError) Error() string
- func (e ListUserRequestValidationError) ErrorName() string
- func (e ListUserRequestValidationError) Field() string
- func (e ListUserRequestValidationError) Key() bool
- func (e ListUserRequestValidationError) Reason() string
- type ListUserResponse
- func (*ListUserResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ListUserResponse) GetTotalCount() int64
- func (x *ListUserResponse) GetUsers() []*UserReply
- func (*ListUserResponse) ProtoMessage()
- func (x *ListUserResponse) ProtoReflect() protoreflect.Message
- func (x *ListUserResponse) Reset()
- func (x *ListUserResponse) String() string
- func (m *ListUserResponse) Validate() error
- func (m *ListUserResponse) ValidateAll() error
- type ListUserResponseMultiError
- type ListUserResponseValidationError
- func (e ListUserResponseValidationError) Cause() error
- func (e ListUserResponseValidationError) Error() string
- func (e ListUserResponseValidationError) ErrorName() string
- func (e ListUserResponseValidationError) Field() string
- func (e ListUserResponseValidationError) Key() bool
- func (e ListUserResponseValidationError) Reason() string
- type LoginReply
- func (*LoginReply) Descriptor() ([]byte, []int)deprecated
- func (x *LoginReply) GetAccessToken() string
- func (x *LoginReply) GetExpiresAt() int64
- func (x *LoginReply) GetRefreshToken() string
- func (x *LoginReply) GetType() string
- func (*LoginReply) ProtoMessage()
- func (x *LoginReply) ProtoReflect() protoreflect.Message
- func (x *LoginReply) Reset()
- func (x *LoginReply) String() string
- func (m *LoginReply) Validate() error
- func (m *LoginReply) ValidateAll() error
- type LoginReplyMultiError
- type LoginReplyValidationError
- type LoginRequest
- func (*LoginRequest) Descriptor() ([]byte, []int)deprecated
- func (x *LoginRequest) GetPassword() string
- func (x *LoginRequest) GetUsername() string
- func (*LoginRequest) ProtoMessage()
- func (x *LoginRequest) ProtoReflect() protoreflect.Message
- func (x *LoginRequest) Reset()
- func (x *LoginRequest) String() string
- func (m *LoginRequest) Validate() error
- func (m *LoginRequest) ValidateAll() error
- type LoginRequestMultiError
- type LoginRequestValidationError
- func (e LoginRequestValidationError) Cause() error
- func (e LoginRequestValidationError) Error() string
- func (e LoginRequestValidationError) ErrorName() string
- func (e LoginRequestValidationError) Field() string
- func (e LoginRequestValidationError) Key() bool
- func (e LoginRequestValidationError) Reason() string
- type UnimplementedUserCenterServer
- func (UnimplementedUserCenterServer) CreateUser(context.Context, *CreateUserRequest) (*UserReply, error)
- func (UnimplementedUserCenterServer) DeleteUser(context.Context, *DeleteUserRequest) (*emptypb.Empty, error)
- func (UnimplementedUserCenterServer) ListUser(context.Context, *ListUserRequest) (*ListUserResponse, error)
- func (UnimplementedUserCenterServer) Login(context.Context, *LoginRequest) (*LoginReply, error)
- type UnsafeUserCenterServer
- type UserCenterClient
- type UserCenterHTTPClient
- type UserCenterHTTPClientImpl
- func (c *UserCenterHTTPClientImpl) CreateUser(ctx context.Context, in *CreateUserRequest, opts ...http.CallOption) (*UserReply, error)
- func (c *UserCenterHTTPClientImpl) DeleteUser(ctx context.Context, in *DeleteUserRequest, opts ...http.CallOption) (*emptypb.Empty, error)
- func (c *UserCenterHTTPClientImpl) ListUser(ctx context.Context, in *ListUserRequest, opts ...http.CallOption) (*ListUserResponse, error)
- func (c *UserCenterHTTPClientImpl) Login(ctx context.Context, in *LoginRequest, opts ...http.CallOption) (*LoginReply, error)
- type UserCenterHTTPServer
- type UserCenterServer
- type UserReply
- func (*UserReply) Descriptor() ([]byte, []int)deprecated
- func (x *UserReply) GetCreatedAt() *timestamppb.Timestamp
- func (x *UserReply) GetEmail() string
- func (x *UserReply) GetNickname() string
- func (x *UserReply) GetPassword() string
- func (x *UserReply) GetPhone() string
- func (x *UserReply) GetSecrets() int64
- func (x *UserReply) GetUpdatedAt() *timestamppb.Timestamp
- func (x *UserReply) GetUserID() string
- func (x *UserReply) GetUsername() string
- func (*UserReply) ProtoMessage()
- func (x *UserReply) ProtoReflect() protoreflect.Message
- func (x *UserReply) Reset()
- func (x *UserReply) String() string
- func (m *UserReply) Validate() error
- func (m *UserReply) ValidateAll() error
- type UserReplyMultiError
- type UserReplyValidationError
Constants ¶
const ( UserCenter_Login_FullMethodName = "/usercenter.v1.UserCenter/Login" UserCenter_CreateUser_FullMethodName = "/usercenter.v1.UserCenter/CreateUser" UserCenter_ListUser_FullMethodName = "/usercenter.v1.UserCenter/ListUser" UserCenter_DeleteUser_FullMethodName = "/usercenter.v1.UserCenter/DeleteUser" )
const OperationUserCenterCreateUser = "/usercenter.v1.UserCenter/CreateUser"
const OperationUserCenterDeleteUser = "/usercenter.v1.UserCenter/DeleteUser"
const OperationUserCenterListUser = "/usercenter.v1.UserCenter/ListUser"
const OperationUserCenterLogin = "/usercenter.v1.UserCenter/Login"
Variables ¶
var File_usercenter_v1_usercenter_proto protoreflect.FileDescriptor
var UserCenter_ServiceDesc = grpc.ServiceDesc{ ServiceName: "usercenter.v1.UserCenter", HandlerType: (*UserCenterServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Login", Handler: _UserCenter_Login_Handler, }, { MethodName: "CreateUser", Handler: _UserCenter_CreateUser_Handler, }, { MethodName: "ListUser", Handler: _UserCenter_ListUser_Handler, }, { MethodName: "DeleteUser", Handler: _UserCenter_DeleteUser_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "usercenter/v1/usercenter.proto", }
UserCenter_ServiceDesc is the grpc.ServiceDesc for UserCenter service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterUserCenterHTTPServer ¶
func RegisterUserCenterHTTPServer(s *http.Server, srv UserCenterHTTPServer)
func RegisterUserCenterServer ¶
func RegisterUserCenterServer(s grpc.ServiceRegistrar, srv UserCenterServer)
Types ¶
type CreateUserRequest ¶
type CreateUserRequest struct { Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` Nickname string `protobuf:"bytes,2,opt,name=nickname,proto3" json:"nickname,omitempty"` Password string `protobuf:"bytes,3,opt,name=password,proto3" json:"password,omitempty"` Email string `protobuf:"bytes,4,opt,name=email,proto3" json:"email,omitempty"` Phone string `protobuf:"bytes,5,opt,name=phone,proto3" json:"phone,omitempty"` // contains filtered or unexported fields }
func (*CreateUserRequest) Descriptor
deprecated
func (*CreateUserRequest) Descriptor() ([]byte, []int)
Deprecated: Use CreateUserRequest.ProtoReflect.Descriptor instead.
func (*CreateUserRequest) GetEmail ¶
func (x *CreateUserRequest) GetEmail() string
func (*CreateUserRequest) GetNickname ¶
func (x *CreateUserRequest) GetNickname() string
func (*CreateUserRequest) GetPassword ¶
func (x *CreateUserRequest) GetPassword() string
func (*CreateUserRequest) GetPhone ¶
func (x *CreateUserRequest) GetPhone() string
func (*CreateUserRequest) GetUsername ¶
func (x *CreateUserRequest) GetUsername() string
func (*CreateUserRequest) ProtoMessage ¶
func (*CreateUserRequest) ProtoMessage()
func (*CreateUserRequest) ProtoReflect ¶
func (x *CreateUserRequest) ProtoReflect() protoreflect.Message
func (*CreateUserRequest) Reset ¶
func (x *CreateUserRequest) Reset()
func (*CreateUserRequest) String ¶
func (x *CreateUserRequest) String() string
func (*CreateUserRequest) Validate ¶
func (m *CreateUserRequest) Validate() error
Validate checks the field values on CreateUserRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*CreateUserRequest) ValidateAll ¶
func (m *CreateUserRequest) ValidateAll() error
ValidateAll checks the field values on CreateUserRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in CreateUserRequestMultiError, or nil if none found.
type CreateUserRequestMultiError ¶
type CreateUserRequestMultiError []error
CreateUserRequestMultiError is an error wrapping multiple validation errors returned by CreateUserRequest.ValidateAll() if the designated constraints aren't met.
func (CreateUserRequestMultiError) AllErrors ¶
func (m CreateUserRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (CreateUserRequestMultiError) Error ¶
func (m CreateUserRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type CreateUserRequestValidationError ¶
type CreateUserRequestValidationError struct {
// contains filtered or unexported fields
}
CreateUserRequestValidationError is the validation error returned by CreateUserRequest.Validate if the designated constraints aren't met.
func (CreateUserRequestValidationError) Cause ¶
func (e CreateUserRequestValidationError) Cause() error
Cause function returns cause value.
func (CreateUserRequestValidationError) Error ¶
func (e CreateUserRequestValidationError) Error() string
Error satisfies the builtin error interface
func (CreateUserRequestValidationError) ErrorName ¶
func (e CreateUserRequestValidationError) ErrorName() string
ErrorName returns error name.
func (CreateUserRequestValidationError) Field ¶
func (e CreateUserRequestValidationError) Field() string
Field function returns field value.
func (CreateUserRequestValidationError) Key ¶
func (e CreateUserRequestValidationError) Key() bool
Key function returns key value.
func (CreateUserRequestValidationError) Reason ¶
func (e CreateUserRequestValidationError) Reason() string
Reason function returns reason value.
type DeleteUserRequest ¶
type DeleteUserRequest struct { Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` // contains filtered or unexported fields }
func (*DeleteUserRequest) Descriptor
deprecated
func (*DeleteUserRequest) Descriptor() ([]byte, []int)
Deprecated: Use DeleteUserRequest.ProtoReflect.Descriptor instead.
func (*DeleteUserRequest) GetUsername ¶
func (x *DeleteUserRequest) GetUsername() string
func (*DeleteUserRequest) ProtoMessage ¶
func (*DeleteUserRequest) ProtoMessage()
func (*DeleteUserRequest) ProtoReflect ¶
func (x *DeleteUserRequest) ProtoReflect() protoreflect.Message
func (*DeleteUserRequest) Reset ¶
func (x *DeleteUserRequest) Reset()
func (*DeleteUserRequest) String ¶
func (x *DeleteUserRequest) String() string
func (*DeleteUserRequest) Validate ¶
func (m *DeleteUserRequest) Validate() error
Validate checks the field values on DeleteUserRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*DeleteUserRequest) ValidateAll ¶
func (m *DeleteUserRequest) ValidateAll() error
ValidateAll checks the field values on DeleteUserRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in DeleteUserRequestMultiError, or nil if none found.
type DeleteUserRequestMultiError ¶
type DeleteUserRequestMultiError []error
DeleteUserRequestMultiError is an error wrapping multiple validation errors returned by DeleteUserRequest.ValidateAll() if the designated constraints aren't met.
func (DeleteUserRequestMultiError) AllErrors ¶
func (m DeleteUserRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (DeleteUserRequestMultiError) Error ¶
func (m DeleteUserRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type DeleteUserRequestValidationError ¶
type DeleteUserRequestValidationError struct {
// contains filtered or unexported fields
}
DeleteUserRequestValidationError is the validation error returned by DeleteUserRequest.Validate if the designated constraints aren't met.
func (DeleteUserRequestValidationError) Cause ¶
func (e DeleteUserRequestValidationError) Cause() error
Cause function returns cause value.
func (DeleteUserRequestValidationError) Error ¶
func (e DeleteUserRequestValidationError) Error() string
Error satisfies the builtin error interface
func (DeleteUserRequestValidationError) ErrorName ¶
func (e DeleteUserRequestValidationError) ErrorName() string
ErrorName returns error name.
func (DeleteUserRequestValidationError) Field ¶
func (e DeleteUserRequestValidationError) Field() string
Field function returns field value.
func (DeleteUserRequestValidationError) Key ¶
func (e DeleteUserRequestValidationError) Key() bool
Key function returns key value.
func (DeleteUserRequestValidationError) Reason ¶
func (e DeleteUserRequestValidationError) Reason() string
Reason function returns reason value.
type ListUserRequest ¶
type ListUserRequest struct { Limit int64 `protobuf:"varint,1,opt,name=limit,proto3" json:"limit,omitempty"` Offset int64 `protobuf:"varint,2,opt,name=offset,proto3" json:"offset,omitempty"` // contains filtered or unexported fields }
func (*ListUserRequest) Descriptor
deprecated
func (*ListUserRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListUserRequest.ProtoReflect.Descriptor instead.
func (*ListUserRequest) GetLimit ¶
func (x *ListUserRequest) GetLimit() int64
func (*ListUserRequest) GetOffset ¶
func (x *ListUserRequest) GetOffset() int64
func (*ListUserRequest) ProtoMessage ¶
func (*ListUserRequest) ProtoMessage()
func (*ListUserRequest) ProtoReflect ¶
func (x *ListUserRequest) ProtoReflect() protoreflect.Message
func (*ListUserRequest) Reset ¶
func (x *ListUserRequest) Reset()
func (*ListUserRequest) String ¶
func (x *ListUserRequest) String() string
func (*ListUserRequest) Validate ¶
func (m *ListUserRequest) Validate() error
Validate checks the field values on ListUserRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*ListUserRequest) ValidateAll ¶
func (m *ListUserRequest) ValidateAll() error
ValidateAll checks the field values on ListUserRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in ListUserRequestMultiError, or nil if none found.
type ListUserRequestMultiError ¶
type ListUserRequestMultiError []error
ListUserRequestMultiError is an error wrapping multiple validation errors returned by ListUserRequest.ValidateAll() if the designated constraints aren't met.
func (ListUserRequestMultiError) AllErrors ¶
func (m ListUserRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (ListUserRequestMultiError) Error ¶
func (m ListUserRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type ListUserRequestValidationError ¶
type ListUserRequestValidationError struct {
// contains filtered or unexported fields
}
ListUserRequestValidationError is the validation error returned by ListUserRequest.Validate if the designated constraints aren't met.
func (ListUserRequestValidationError) Cause ¶
func (e ListUserRequestValidationError) Cause() error
Cause function returns cause value.
func (ListUserRequestValidationError) Error ¶
func (e ListUserRequestValidationError) Error() string
Error satisfies the builtin error interface
func (ListUserRequestValidationError) ErrorName ¶
func (e ListUserRequestValidationError) ErrorName() string
ErrorName returns error name.
func (ListUserRequestValidationError) Field ¶
func (e ListUserRequestValidationError) Field() string
Field function returns field value.
func (ListUserRequestValidationError) Key ¶
func (e ListUserRequestValidationError) Key() bool
Key function returns key value.
func (ListUserRequestValidationError) Reason ¶
func (e ListUserRequestValidationError) Reason() string
Reason function returns reason value.
type ListUserResponse ¶
type ListUserResponse struct { TotalCount int64 `protobuf:"varint,1,opt,name=totalCount,proto3" json:"totalCount,omitempty"` Users []*UserReply `protobuf:"bytes,2,rep,name=Users,proto3" json:"Users,omitempty"` // contains filtered or unexported fields }
func (*ListUserResponse) Descriptor
deprecated
func (*ListUserResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListUserResponse.ProtoReflect.Descriptor instead.
func (*ListUserResponse) GetTotalCount ¶
func (x *ListUserResponse) GetTotalCount() int64
func (*ListUserResponse) GetUsers ¶
func (x *ListUserResponse) GetUsers() []*UserReply
func (*ListUserResponse) ProtoMessage ¶
func (*ListUserResponse) ProtoMessage()
func (*ListUserResponse) ProtoReflect ¶
func (x *ListUserResponse) ProtoReflect() protoreflect.Message
func (*ListUserResponse) Reset ¶
func (x *ListUserResponse) Reset()
func (*ListUserResponse) String ¶
func (x *ListUserResponse) String() string
func (*ListUserResponse) Validate ¶
func (m *ListUserResponse) Validate() error
Validate checks the field values on ListUserResponse with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*ListUserResponse) ValidateAll ¶
func (m *ListUserResponse) ValidateAll() error
ValidateAll checks the field values on ListUserResponse with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in ListUserResponseMultiError, or nil if none found.
type ListUserResponseMultiError ¶
type ListUserResponseMultiError []error
ListUserResponseMultiError is an error wrapping multiple validation errors returned by ListUserResponse.ValidateAll() if the designated constraints aren't met.
func (ListUserResponseMultiError) AllErrors ¶
func (m ListUserResponseMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (ListUserResponseMultiError) Error ¶
func (m ListUserResponseMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type ListUserResponseValidationError ¶
type ListUserResponseValidationError struct {
// contains filtered or unexported fields
}
ListUserResponseValidationError is the validation error returned by ListUserResponse.Validate if the designated constraints aren't met.
func (ListUserResponseValidationError) Cause ¶
func (e ListUserResponseValidationError) Cause() error
Cause function returns cause value.
func (ListUserResponseValidationError) Error ¶
func (e ListUserResponseValidationError) Error() string
Error satisfies the builtin error interface
func (ListUserResponseValidationError) ErrorName ¶
func (e ListUserResponseValidationError) ErrorName() string
ErrorName returns error name.
func (ListUserResponseValidationError) Field ¶
func (e ListUserResponseValidationError) Field() string
Field function returns field value.
func (ListUserResponseValidationError) Key ¶
func (e ListUserResponseValidationError) Key() bool
Key function returns key value.
func (ListUserResponseValidationError) Reason ¶
func (e ListUserResponseValidationError) Reason() string
Reason function returns reason value.
type LoginReply ¶
type LoginReply struct { RefreshToken string `protobuf:"bytes,1,opt,name=refresh_token,json=refreshToken,proto3" json:"refresh_token,omitempty"` AccessToken string `protobuf:"bytes,2,opt,name=access_token,json=accessToken,proto3" json:"access_token,omitempty"` Type string `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"` ExpiresAt int64 `protobuf:"varint,4,opt,name=expiresAt,proto3" json:"expiresAt,omitempty"` // contains filtered or unexported fields }
func (*LoginReply) Descriptor
deprecated
func (*LoginReply) Descriptor() ([]byte, []int)
Deprecated: Use LoginReply.ProtoReflect.Descriptor instead.
func (*LoginReply) GetAccessToken ¶
func (x *LoginReply) GetAccessToken() string
func (*LoginReply) GetExpiresAt ¶
func (x *LoginReply) GetExpiresAt() int64
func (*LoginReply) GetRefreshToken ¶
func (x *LoginReply) GetRefreshToken() string
func (*LoginReply) GetType ¶
func (x *LoginReply) GetType() string
func (*LoginReply) ProtoMessage ¶
func (*LoginReply) ProtoMessage()
func (*LoginReply) ProtoReflect ¶
func (x *LoginReply) ProtoReflect() protoreflect.Message
func (*LoginReply) Reset ¶
func (x *LoginReply) Reset()
func (*LoginReply) String ¶
func (x *LoginReply) String() string
func (*LoginReply) Validate ¶
func (m *LoginReply) Validate() error
Validate checks the field values on LoginReply with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*LoginReply) ValidateAll ¶
func (m *LoginReply) ValidateAll() error
ValidateAll checks the field values on LoginReply with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in LoginReplyMultiError, or nil if none found.
type LoginReplyMultiError ¶
type LoginReplyMultiError []error
LoginReplyMultiError is an error wrapping multiple validation errors returned by LoginReply.ValidateAll() if the designated constraints aren't met.
func (LoginReplyMultiError) AllErrors ¶
func (m LoginReplyMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (LoginReplyMultiError) Error ¶
func (m LoginReplyMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type LoginReplyValidationError ¶
type LoginReplyValidationError struct {
// contains filtered or unexported fields
}
LoginReplyValidationError is the validation error returned by LoginReply.Validate if the designated constraints aren't met.
func (LoginReplyValidationError) Cause ¶
func (e LoginReplyValidationError) Cause() error
Cause function returns cause value.
func (LoginReplyValidationError) Error ¶
func (e LoginReplyValidationError) Error() string
Error satisfies the builtin error interface
func (LoginReplyValidationError) ErrorName ¶
func (e LoginReplyValidationError) ErrorName() string
ErrorName returns error name.
func (LoginReplyValidationError) Field ¶
func (e LoginReplyValidationError) Field() string
Field function returns field value.
func (LoginReplyValidationError) Key ¶
func (e LoginReplyValidationError) Key() bool
Key function returns key value.
func (LoginReplyValidationError) Reason ¶
func (e LoginReplyValidationError) Reason() string
Reason function returns reason value.
type LoginRequest ¶
type LoginRequest struct { Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` // contains filtered or unexported fields }
func (*LoginRequest) Descriptor
deprecated
func (*LoginRequest) Descriptor() ([]byte, []int)
Deprecated: Use LoginRequest.ProtoReflect.Descriptor instead.
func (*LoginRequest) GetPassword ¶
func (x *LoginRequest) GetPassword() string
func (*LoginRequest) GetUsername ¶
func (x *LoginRequest) GetUsername() string
func (*LoginRequest) ProtoMessage ¶
func (*LoginRequest) ProtoMessage()
func (*LoginRequest) ProtoReflect ¶
func (x *LoginRequest) ProtoReflect() protoreflect.Message
func (*LoginRequest) Reset ¶
func (x *LoginRequest) Reset()
func (*LoginRequest) String ¶
func (x *LoginRequest) String() string
func (*LoginRequest) Validate ¶
func (m *LoginRequest) Validate() error
Validate checks the field values on LoginRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*LoginRequest) ValidateAll ¶
func (m *LoginRequest) ValidateAll() error
ValidateAll checks the field values on LoginRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in LoginRequestMultiError, or nil if none found.
type LoginRequestMultiError ¶
type LoginRequestMultiError []error
LoginRequestMultiError is an error wrapping multiple validation errors returned by LoginRequest.ValidateAll() if the designated constraints aren't met.
func (LoginRequestMultiError) AllErrors ¶
func (m LoginRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (LoginRequestMultiError) Error ¶
func (m LoginRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type LoginRequestValidationError ¶
type LoginRequestValidationError struct {
// contains filtered or unexported fields
}
LoginRequestValidationError is the validation error returned by LoginRequest.Validate if the designated constraints aren't met.
func (LoginRequestValidationError) Cause ¶
func (e LoginRequestValidationError) Cause() error
Cause function returns cause value.
func (LoginRequestValidationError) Error ¶
func (e LoginRequestValidationError) Error() string
Error satisfies the builtin error interface
func (LoginRequestValidationError) ErrorName ¶
func (e LoginRequestValidationError) ErrorName() string
ErrorName returns error name.
func (LoginRequestValidationError) Field ¶
func (e LoginRequestValidationError) Field() string
Field function returns field value.
func (LoginRequestValidationError) Key ¶
func (e LoginRequestValidationError) Key() bool
Key function returns key value.
func (LoginRequestValidationError) Reason ¶
func (e LoginRequestValidationError) Reason() string
Reason function returns reason value.
type UnimplementedUserCenterServer ¶
type UnimplementedUserCenterServer struct { }
UnimplementedUserCenterServer must be embedded to have forward compatible implementations.
func (UnimplementedUserCenterServer) CreateUser ¶
func (UnimplementedUserCenterServer) CreateUser(context.Context, *CreateUserRequest) (*UserReply, error)
func (UnimplementedUserCenterServer) DeleteUser ¶
func (UnimplementedUserCenterServer) DeleteUser(context.Context, *DeleteUserRequest) (*emptypb.Empty, error)
func (UnimplementedUserCenterServer) ListUser ¶
func (UnimplementedUserCenterServer) ListUser(context.Context, *ListUserRequest) (*ListUserResponse, error)
func (UnimplementedUserCenterServer) Login ¶
func (UnimplementedUserCenterServer) Login(context.Context, *LoginRequest) (*LoginReply, error)
type UnsafeUserCenterServer ¶
type UnsafeUserCenterServer interface {
// contains filtered or unexported methods
}
UnsafeUserCenterServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to UserCenterServer will result in compilation errors.
type UserCenterClient ¶
type UserCenterClient interface { Login(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*LoginReply, error) // CreateUser CreateUser(ctx context.Context, in *CreateUserRequest, opts ...grpc.CallOption) (*UserReply, error) // ListUser ListUser(ctx context.Context, in *ListUserRequest, opts ...grpc.CallOption) (*ListUserResponse, error) // DeleteUser DeleteUser(ctx context.Context, in *DeleteUserRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) }
UserCenterClient is the client API for UserCenter service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewUserCenterClient ¶
func NewUserCenterClient(cc grpc.ClientConnInterface) UserCenterClient
type UserCenterHTTPClient ¶
type UserCenterHTTPClient interface { CreateUser(ctx context.Context, req *CreateUserRequest, opts ...http.CallOption) (rsp *UserReply, err error) DeleteUser(ctx context.Context, req *DeleteUserRequest, opts ...http.CallOption) (rsp *emptypb.Empty, err error) ListUser(ctx context.Context, req *ListUserRequest, opts ...http.CallOption) (rsp *ListUserResponse, err error) Login(ctx context.Context, req *LoginRequest, opts ...http.CallOption) (rsp *LoginReply, err error) }
func NewUserCenterHTTPClient ¶
func NewUserCenterHTTPClient(client *http.Client) UserCenterHTTPClient
type UserCenterHTTPClientImpl ¶
type UserCenterHTTPClientImpl struct {
// contains filtered or unexported fields
}
func (*UserCenterHTTPClientImpl) CreateUser ¶
func (c *UserCenterHTTPClientImpl) CreateUser(ctx context.Context, in *CreateUserRequest, opts ...http.CallOption) (*UserReply, error)
func (*UserCenterHTTPClientImpl) DeleteUser ¶
func (c *UserCenterHTTPClientImpl) DeleteUser(ctx context.Context, in *DeleteUserRequest, opts ...http.CallOption) (*emptypb.Empty, error)
func (*UserCenterHTTPClientImpl) ListUser ¶
func (c *UserCenterHTTPClientImpl) ListUser(ctx context.Context, in *ListUserRequest, opts ...http.CallOption) (*ListUserResponse, error)
func (*UserCenterHTTPClientImpl) Login ¶
func (c *UserCenterHTTPClientImpl) Login(ctx context.Context, in *LoginRequest, opts ...http.CallOption) (*LoginReply, error)
type UserCenterHTTPServer ¶
type UserCenterHTTPServer interface { // CreateUser CreateUser CreateUser(context.Context, *CreateUserRequest) (*UserReply, error) // DeleteUser DeleteUser DeleteUser(context.Context, *DeleteUserRequest) (*emptypb.Empty, error) // ListUser ListUser ListUser(context.Context, *ListUserRequest) (*ListUserResponse, error) Login(context.Context, *LoginRequest) (*LoginReply, error) }
type UserCenterServer ¶
type UserCenterServer interface { Login(context.Context, *LoginRequest) (*LoginReply, error) // CreateUser CreateUser(context.Context, *CreateUserRequest) (*UserReply, error) // ListUser ListUser(context.Context, *ListUserRequest) (*ListUserResponse, error) // DeleteUser DeleteUser(context.Context, *DeleteUserRequest) (*emptypb.Empty, error) // contains filtered or unexported methods }
UserCenterServer is the server API for UserCenter service. All implementations must embed UnimplementedUserCenterServer for forward compatibility
type UserReply ¶
type UserReply struct { UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID,omitempty"` Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"` Nickname string `protobuf:"bytes,3,opt,name=nickname,proto3" json:"nickname,omitempty"` Password string `protobuf:"bytes,4,opt,name=password,proto3" json:"password,omitempty"` Email string `protobuf:"bytes,5,opt,name=email,proto3" json:"email,omitempty"` Phone string `protobuf:"bytes,6,opt,name=phone,proto3" json:"phone,omitempty"` Secrets int64 `protobuf:"varint,7,opt,name=secrets,proto3" json:"secrets,omitempty"` CreatedAt *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=createdAt,proto3" json:"createdAt,omitempty"` UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=updatedAt,proto3" json:"updatedAt,omitempty"` // contains filtered or unexported fields }
func (*UserReply) Descriptor
deprecated
func (*UserReply) GetCreatedAt ¶
func (x *UserReply) GetCreatedAt() *timestamppb.Timestamp
func (*UserReply) GetNickname ¶
func (*UserReply) GetPassword ¶
func (*UserReply) GetSecrets ¶
func (*UserReply) GetUpdatedAt ¶
func (x *UserReply) GetUpdatedAt() *timestamppb.Timestamp
func (*UserReply) GetUsername ¶
func (*UserReply) ProtoMessage ¶
func (*UserReply) ProtoMessage()
func (*UserReply) ProtoReflect ¶
func (x *UserReply) ProtoReflect() protoreflect.Message
func (*UserReply) Validate ¶
Validate checks the field values on UserReply with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*UserReply) ValidateAll ¶
ValidateAll checks the field values on UserReply with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in UserReplyMultiError, or nil if none found.
type UserReplyMultiError ¶
type UserReplyMultiError []error
UserReplyMultiError is an error wrapping multiple validation errors returned by UserReply.ValidateAll() if the designated constraints aren't met.
func (UserReplyMultiError) AllErrors ¶
func (m UserReplyMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (UserReplyMultiError) Error ¶
func (m UserReplyMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type UserReplyValidationError ¶
type UserReplyValidationError struct {
// contains filtered or unexported fields
}
UserReplyValidationError is the validation error returned by UserReply.Validate if the designated constraints aren't met.
func (UserReplyValidationError) Cause ¶
func (e UserReplyValidationError) Cause() error
Cause function returns cause value.
func (UserReplyValidationError) Error ¶
func (e UserReplyValidationError) Error() string
Error satisfies the builtin error interface
func (UserReplyValidationError) ErrorName ¶
func (e UserReplyValidationError) ErrorName() string
ErrorName returns error name.
func (UserReplyValidationError) Field ¶
func (e UserReplyValidationError) Field() string
Field function returns field value.
func (UserReplyValidationError) Key ¶
func (e UserReplyValidationError) Key() bool
Key function returns key value.
func (UserReplyValidationError) Reason ¶
func (e UserReplyValidationError) Reason() string
Reason function returns reason value.