Documentation ¶
Index ¶
- Constants
- Variables
- func ErrorLoginFailed(format string, args ...interface{}) *errors.Error
- func ErrorRegisterFailed(format string, args ...interface{}) *errors.Error
- func ErrorUnknownError(format string, args ...interface{}) *errors.Error
- func ErrorUsernameConflict(format string, args ...interface{}) *errors.Error
- func IsLoginFailed(err error) bool
- func IsRegisterFailed(err error) bool
- func IsUnknownError(err error) bool
- func IsUsernameConflict(err error) bool
- func RegisterCenterInterfaceHTTPServer(s *http.Server, srv CenterInterfaceHTTPServer)
- func RegisterCenterInterfaceServer(s grpc.ServiceRegistrar, srv CenterInterfaceServer)
- type CenterInterfaceClient
- type CenterInterfaceErrorReason
- func (CenterInterfaceErrorReason) Descriptor() protoreflect.EnumDescriptor
- func (x CenterInterfaceErrorReason) Enum() *CenterInterfaceErrorReason
- func (CenterInterfaceErrorReason) EnumDescriptor() ([]byte, []int)deprecated
- func (x CenterInterfaceErrorReason) Number() protoreflect.EnumNumber
- func (x CenterInterfaceErrorReason) String() string
- func (CenterInterfaceErrorReason) Type() protoreflect.EnumType
- type CenterInterfaceHTTPClient
- type CenterInterfaceHTTPClientImpl
- func (c *CenterInterfaceHTTPClientImpl) Login(ctx context.Context, in *LoginReq, opts ...http.CallOption) (*LoginReply, error)
- func (c *CenterInterfaceHTTPClientImpl) Logout(ctx context.Context, in *LogoutReq, opts ...http.CallOption) (*LogoutReply, error)
- func (c *CenterInterfaceHTTPClientImpl) Register(ctx context.Context, in *RegisterReq, opts ...http.CallOption) (*RegisterReply, error)
- type CenterInterfaceHTTPServer
- type CenterInterfaceServer
- type LoginReply
- func (*LoginReply) Descriptor() ([]byte, []int)deprecated
- func (x *LoginReply) GetToken() 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 LoginReq
- func (*LoginReq) Descriptor() ([]byte, []int)deprecated
- func (x *LoginReq) GetPassword() string
- func (x *LoginReq) GetUsername() string
- func (*LoginReq) ProtoMessage()
- func (x *LoginReq) ProtoReflect() protoreflect.Message
- func (x *LoginReq) Reset()
- func (x *LoginReq) String() string
- func (m *LoginReq) Validate() error
- func (m *LoginReq) ValidateAll() error
- type LoginReqMultiError
- type LoginReqValidationError
- type LogoutReply
- func (*LogoutReply) Descriptor() ([]byte, []int)deprecated
- func (*LogoutReply) ProtoMessage()
- func (x *LogoutReply) ProtoReflect() protoreflect.Message
- func (x *LogoutReply) Reset()
- func (x *LogoutReply) String() string
- func (m *LogoutReply) Validate() error
- func (m *LogoutReply) ValidateAll() error
- type LogoutReplyMultiError
- type LogoutReplyValidationError
- func (e LogoutReplyValidationError) Cause() error
- func (e LogoutReplyValidationError) Error() string
- func (e LogoutReplyValidationError) ErrorName() string
- func (e LogoutReplyValidationError) Field() string
- func (e LogoutReplyValidationError) Key() bool
- func (e LogoutReplyValidationError) Reason() string
- type LogoutReq
- type LogoutReqMultiError
- type LogoutReqValidationError
- type RegisterReply
- func (*RegisterReply) Descriptor() ([]byte, []int)deprecated
- func (x *RegisterReply) GetId() int64
- func (*RegisterReply) ProtoMessage()
- func (x *RegisterReply) ProtoReflect() protoreflect.Message
- func (x *RegisterReply) Reset()
- func (x *RegisterReply) String() string
- func (m *RegisterReply) Validate() error
- func (m *RegisterReply) ValidateAll() error
- type RegisterReplyMultiError
- type RegisterReplyValidationError
- func (e RegisterReplyValidationError) Cause() error
- func (e RegisterReplyValidationError) Error() string
- func (e RegisterReplyValidationError) ErrorName() string
- func (e RegisterReplyValidationError) Field() string
- func (e RegisterReplyValidationError) Key() bool
- func (e RegisterReplyValidationError) Reason() string
- type RegisterReq
- func (*RegisterReq) Descriptor() ([]byte, []int)deprecated
- func (x *RegisterReq) GetPassword() string
- func (x *RegisterReq) GetUsername() string
- func (*RegisterReq) ProtoMessage()
- func (x *RegisterReq) ProtoReflect() protoreflect.Message
- func (x *RegisterReq) Reset()
- func (x *RegisterReq) String() string
- func (m *RegisterReq) Validate() error
- func (m *RegisterReq) ValidateAll() error
- type RegisterReqMultiError
- type RegisterReqValidationError
- func (e RegisterReqValidationError) Cause() error
- func (e RegisterReqValidationError) Error() string
- func (e RegisterReqValidationError) ErrorName() string
- func (e RegisterReqValidationError) Field() string
- func (e RegisterReqValidationError) Key() bool
- func (e RegisterReqValidationError) Reason() string
- type UnimplementedCenterInterfaceServer
- func (UnimplementedCenterInterfaceServer) Login(context.Context, *LoginReq) (*LoginReply, error)
- func (UnimplementedCenterInterfaceServer) Logout(context.Context, *LogoutReq) (*LogoutReply, error)
- func (UnimplementedCenterInterfaceServer) Register(context.Context, *RegisterReq) (*RegisterReply, error)
- type UnsafeCenterInterfaceServer
Constants ¶
const OperationCenterInterfaceLogin = "/center.interface.v1.CenterInterface/Login"
const OperationCenterInterfaceLogout = "/center.interface.v1.CenterInterface/Logout"
const OperationCenterInterfaceRegister = "/center.interface.v1.CenterInterface/Register"
Variables ¶
var ( CenterInterfaceErrorReason_name = map[int32]string{ 0: "UNKNOWN_ERROR", 1: "LOGIN_FAILED", 2: "USERNAME_CONFLICT", 3: "REGISTER_FAILED", } CenterInterfaceErrorReason_value = map[string]int32{ "UNKNOWN_ERROR": 0, "LOGIN_FAILED": 1, "USERNAME_CONFLICT": 2, "REGISTER_FAILED": 3, } )
Enum value maps for CenterInterfaceErrorReason.
var CenterInterface_ServiceDesc = grpc.ServiceDesc{ ServiceName: "center.interface.v1.CenterInterface", HandlerType: (*CenterInterfaceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Register", Handler: _CenterInterface_Register_Handler, }, { MethodName: "Login", Handler: _CenterInterface_Login_Handler, }, { MethodName: "Logout", Handler: _CenterInterface_Logout_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "v1/center_interface.proto", }
CenterInterface_ServiceDesc is the grpc.ServiceDesc for CenterInterface service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_v1_center_interface_error_proto protoreflect.FileDescriptor
var File_v1_center_interface_proto protoreflect.FileDescriptor
Functions ¶
func ErrorLoginFailed ¶
func ErrorRegisterFailed ¶
func ErrorUnknownError ¶
func ErrorUsernameConflict ¶
func IsLoginFailed ¶
func IsRegisterFailed ¶
func IsUnknownError ¶
func IsUsernameConflict ¶
func RegisterCenterInterfaceHTTPServer ¶
func RegisterCenterInterfaceHTTPServer(s *http.Server, srv CenterInterfaceHTTPServer)
func RegisterCenterInterfaceServer ¶
func RegisterCenterInterfaceServer(s grpc.ServiceRegistrar, srv CenterInterfaceServer)
Types ¶
type CenterInterfaceClient ¶
type CenterInterfaceClient interface { Register(ctx context.Context, in *RegisterReq, opts ...grpc.CallOption) (*RegisterReply, error) Login(ctx context.Context, in *LoginReq, opts ...grpc.CallOption) (*LoginReply, error) Logout(ctx context.Context, in *LogoutReq, opts ...grpc.CallOption) (*LogoutReply, error) }
CenterInterfaceClient is the client API for CenterInterface 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 NewCenterInterfaceClient ¶
func NewCenterInterfaceClient(cc grpc.ClientConnInterface) CenterInterfaceClient
type CenterInterfaceErrorReason ¶
type CenterInterfaceErrorReason int32
const ( CenterInterfaceErrorReason_UNKNOWN_ERROR CenterInterfaceErrorReason = 0 CenterInterfaceErrorReason_LOGIN_FAILED CenterInterfaceErrorReason = 1 CenterInterfaceErrorReason_USERNAME_CONFLICT CenterInterfaceErrorReason = 2 CenterInterfaceErrorReason_REGISTER_FAILED CenterInterfaceErrorReason = 3 )
func (CenterInterfaceErrorReason) Descriptor ¶
func (CenterInterfaceErrorReason) Descriptor() protoreflect.EnumDescriptor
func (CenterInterfaceErrorReason) Enum ¶
func (x CenterInterfaceErrorReason) Enum() *CenterInterfaceErrorReason
func (CenterInterfaceErrorReason) EnumDescriptor
deprecated
func (CenterInterfaceErrorReason) EnumDescriptor() ([]byte, []int)
Deprecated: Use CenterInterfaceErrorReason.Descriptor instead.
func (CenterInterfaceErrorReason) Number ¶
func (x CenterInterfaceErrorReason) Number() protoreflect.EnumNumber
func (CenterInterfaceErrorReason) String ¶
func (x CenterInterfaceErrorReason) String() string
func (CenterInterfaceErrorReason) Type ¶
func (CenterInterfaceErrorReason) Type() protoreflect.EnumType
type CenterInterfaceHTTPClient ¶
type CenterInterfaceHTTPClient interface { Login(ctx context.Context, req *LoginReq, opts ...http.CallOption) (rsp *LoginReply, err error) Logout(ctx context.Context, req *LogoutReq, opts ...http.CallOption) (rsp *LogoutReply, err error) Register(ctx context.Context, req *RegisterReq, opts ...http.CallOption) (rsp *RegisterReply, err error) }
func NewCenterInterfaceHTTPClient ¶
func NewCenterInterfaceHTTPClient(client *http.Client) CenterInterfaceHTTPClient
type CenterInterfaceHTTPClientImpl ¶
type CenterInterfaceHTTPClientImpl struct {
// contains filtered or unexported fields
}
func (*CenterInterfaceHTTPClientImpl) Login ¶
func (c *CenterInterfaceHTTPClientImpl) Login(ctx context.Context, in *LoginReq, opts ...http.CallOption) (*LoginReply, error)
func (*CenterInterfaceHTTPClientImpl) Logout ¶
func (c *CenterInterfaceHTTPClientImpl) Logout(ctx context.Context, in *LogoutReq, opts ...http.CallOption) (*LogoutReply, error)
func (*CenterInterfaceHTTPClientImpl) Register ¶
func (c *CenterInterfaceHTTPClientImpl) Register(ctx context.Context, in *RegisterReq, opts ...http.CallOption) (*RegisterReply, error)
type CenterInterfaceHTTPServer ¶
type CenterInterfaceHTTPServer interface { Login(context.Context, *LoginReq) (*LoginReply, error) Logout(context.Context, *LogoutReq) (*LogoutReply, error) Register(context.Context, *RegisterReq) (*RegisterReply, error) }
type CenterInterfaceServer ¶
type CenterInterfaceServer interface { Register(context.Context, *RegisterReq) (*RegisterReply, error) Login(context.Context, *LoginReq) (*LoginReply, error) Logout(context.Context, *LogoutReq) (*LogoutReply, error) // contains filtered or unexported methods }
CenterInterfaceServer is the server API for CenterInterface service. All implementations must embed UnimplementedCenterInterfaceServer for forward compatibility
type LoginReply ¶
type LoginReply struct { Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` // contains filtered or unexported fields }
func (*LoginReply) Descriptor
deprecated
func (*LoginReply) Descriptor() ([]byte, []int)
Deprecated: Use LoginReply.ProtoReflect.Descriptor instead.
func (*LoginReply) GetToken ¶
func (x *LoginReply) GetToken() 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 LoginReq ¶
type LoginReq 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 (*LoginReq) Descriptor
deprecated
func (*LoginReq) GetPassword ¶
func (*LoginReq) GetUsername ¶
func (*LoginReq) ProtoMessage ¶
func (*LoginReq) ProtoMessage()
func (*LoginReq) ProtoReflect ¶
func (x *LoginReq) ProtoReflect() protoreflect.Message
func (*LoginReq) Validate ¶
Validate checks the field values on LoginReq 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 (*LoginReq) ValidateAll ¶
ValidateAll checks the field values on LoginReq 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 LoginReqMultiError, or nil if none found.
type LoginReqMultiError ¶
type LoginReqMultiError []error
LoginReqMultiError is an error wrapping multiple validation errors returned by LoginReq.ValidateAll() if the designated constraints aren't met.
func (LoginReqMultiError) AllErrors ¶
func (m LoginReqMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (LoginReqMultiError) Error ¶
func (m LoginReqMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type LoginReqValidationError ¶
type LoginReqValidationError struct {
// contains filtered or unexported fields
}
LoginReqValidationError is the validation error returned by LoginReq.Validate if the designated constraints aren't met.
func (LoginReqValidationError) Cause ¶
func (e LoginReqValidationError) Cause() error
Cause function returns cause value.
func (LoginReqValidationError) Error ¶
func (e LoginReqValidationError) Error() string
Error satisfies the builtin error interface
func (LoginReqValidationError) ErrorName ¶
func (e LoginReqValidationError) ErrorName() string
ErrorName returns error name.
func (LoginReqValidationError) Field ¶
func (e LoginReqValidationError) Field() string
Field function returns field value.
func (LoginReqValidationError) Key ¶
func (e LoginReqValidationError) Key() bool
Key function returns key value.
func (LoginReqValidationError) Reason ¶
func (e LoginReqValidationError) Reason() string
Reason function returns reason value.
type LogoutReply ¶
type LogoutReply struct {
// contains filtered or unexported fields
}
func (*LogoutReply) Descriptor
deprecated
func (*LogoutReply) Descriptor() ([]byte, []int)
Deprecated: Use LogoutReply.ProtoReflect.Descriptor instead.
func (*LogoutReply) ProtoMessage ¶
func (*LogoutReply) ProtoMessage()
func (*LogoutReply) ProtoReflect ¶
func (x *LogoutReply) ProtoReflect() protoreflect.Message
func (*LogoutReply) Reset ¶
func (x *LogoutReply) Reset()
func (*LogoutReply) String ¶
func (x *LogoutReply) String() string
func (*LogoutReply) Validate ¶
func (m *LogoutReply) Validate() error
Validate checks the field values on LogoutReply 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 (*LogoutReply) ValidateAll ¶
func (m *LogoutReply) ValidateAll() error
ValidateAll checks the field values on LogoutReply 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 LogoutReplyMultiError, or nil if none found.
type LogoutReplyMultiError ¶
type LogoutReplyMultiError []error
LogoutReplyMultiError is an error wrapping multiple validation errors returned by LogoutReply.ValidateAll() if the designated constraints aren't met.
func (LogoutReplyMultiError) AllErrors ¶
func (m LogoutReplyMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (LogoutReplyMultiError) Error ¶
func (m LogoutReplyMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type LogoutReplyValidationError ¶
type LogoutReplyValidationError struct {
// contains filtered or unexported fields
}
LogoutReplyValidationError is the validation error returned by LogoutReply.Validate if the designated constraints aren't met.
func (LogoutReplyValidationError) Cause ¶
func (e LogoutReplyValidationError) Cause() error
Cause function returns cause value.
func (LogoutReplyValidationError) Error ¶
func (e LogoutReplyValidationError) Error() string
Error satisfies the builtin error interface
func (LogoutReplyValidationError) ErrorName ¶
func (e LogoutReplyValidationError) ErrorName() string
ErrorName returns error name.
func (LogoutReplyValidationError) Field ¶
func (e LogoutReplyValidationError) Field() string
Field function returns field value.
func (LogoutReplyValidationError) Key ¶
func (e LogoutReplyValidationError) Key() bool
Key function returns key value.
func (LogoutReplyValidationError) Reason ¶
func (e LogoutReplyValidationError) Reason() string
Reason function returns reason value.
type LogoutReq ¶
type LogoutReq struct {
// contains filtered or unexported fields
}
func (*LogoutReq) Descriptor
deprecated
func (*LogoutReq) ProtoMessage ¶
func (*LogoutReq) ProtoMessage()
func (*LogoutReq) ProtoReflect ¶
func (x *LogoutReq) ProtoReflect() protoreflect.Message
func (*LogoutReq) Validate ¶
Validate checks the field values on LogoutReq 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 (*LogoutReq) ValidateAll ¶
ValidateAll checks the field values on LogoutReq 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 LogoutReqMultiError, or nil if none found.
type LogoutReqMultiError ¶
type LogoutReqMultiError []error
LogoutReqMultiError is an error wrapping multiple validation errors returned by LogoutReq.ValidateAll() if the designated constraints aren't met.
func (LogoutReqMultiError) AllErrors ¶
func (m LogoutReqMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (LogoutReqMultiError) Error ¶
func (m LogoutReqMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type LogoutReqValidationError ¶
type LogoutReqValidationError struct {
// contains filtered or unexported fields
}
LogoutReqValidationError is the validation error returned by LogoutReq.Validate if the designated constraints aren't met.
func (LogoutReqValidationError) Cause ¶
func (e LogoutReqValidationError) Cause() error
Cause function returns cause value.
func (LogoutReqValidationError) Error ¶
func (e LogoutReqValidationError) Error() string
Error satisfies the builtin error interface
func (LogoutReqValidationError) ErrorName ¶
func (e LogoutReqValidationError) ErrorName() string
ErrorName returns error name.
func (LogoutReqValidationError) Field ¶
func (e LogoutReqValidationError) Field() string
Field function returns field value.
func (LogoutReqValidationError) Key ¶
func (e LogoutReqValidationError) Key() bool
Key function returns key value.
func (LogoutReqValidationError) Reason ¶
func (e LogoutReqValidationError) Reason() string
Reason function returns reason value.
type RegisterReply ¶
type RegisterReply struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*RegisterReply) Descriptor
deprecated
func (*RegisterReply) Descriptor() ([]byte, []int)
Deprecated: Use RegisterReply.ProtoReflect.Descriptor instead.
func (*RegisterReply) GetId ¶
func (x *RegisterReply) GetId() int64
func (*RegisterReply) ProtoMessage ¶
func (*RegisterReply) ProtoMessage()
func (*RegisterReply) ProtoReflect ¶
func (x *RegisterReply) ProtoReflect() protoreflect.Message
func (*RegisterReply) Reset ¶
func (x *RegisterReply) Reset()
func (*RegisterReply) String ¶
func (x *RegisterReply) String() string
func (*RegisterReply) Validate ¶
func (m *RegisterReply) Validate() error
Validate checks the field values on RegisterReply 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 (*RegisterReply) ValidateAll ¶
func (m *RegisterReply) ValidateAll() error
ValidateAll checks the field values on RegisterReply 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 RegisterReplyMultiError, or nil if none found.
type RegisterReplyMultiError ¶
type RegisterReplyMultiError []error
RegisterReplyMultiError is an error wrapping multiple validation errors returned by RegisterReply.ValidateAll() if the designated constraints aren't met.
func (RegisterReplyMultiError) AllErrors ¶
func (m RegisterReplyMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (RegisterReplyMultiError) Error ¶
func (m RegisterReplyMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type RegisterReplyValidationError ¶
type RegisterReplyValidationError struct {
// contains filtered or unexported fields
}
RegisterReplyValidationError is the validation error returned by RegisterReply.Validate if the designated constraints aren't met.
func (RegisterReplyValidationError) Cause ¶
func (e RegisterReplyValidationError) Cause() error
Cause function returns cause value.
func (RegisterReplyValidationError) Error ¶
func (e RegisterReplyValidationError) Error() string
Error satisfies the builtin error interface
func (RegisterReplyValidationError) ErrorName ¶
func (e RegisterReplyValidationError) ErrorName() string
ErrorName returns error name.
func (RegisterReplyValidationError) Field ¶
func (e RegisterReplyValidationError) Field() string
Field function returns field value.
func (RegisterReplyValidationError) Key ¶
func (e RegisterReplyValidationError) Key() bool
Key function returns key value.
func (RegisterReplyValidationError) Reason ¶
func (e RegisterReplyValidationError) Reason() string
Reason function returns reason value.
type RegisterReq ¶
type RegisterReq 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 (*RegisterReq) Descriptor
deprecated
func (*RegisterReq) Descriptor() ([]byte, []int)
Deprecated: Use RegisterReq.ProtoReflect.Descriptor instead.
func (*RegisterReq) GetPassword ¶
func (x *RegisterReq) GetPassword() string
func (*RegisterReq) GetUsername ¶
func (x *RegisterReq) GetUsername() string
func (*RegisterReq) ProtoMessage ¶
func (*RegisterReq) ProtoMessage()
func (*RegisterReq) ProtoReflect ¶
func (x *RegisterReq) ProtoReflect() protoreflect.Message
func (*RegisterReq) Reset ¶
func (x *RegisterReq) Reset()
func (*RegisterReq) String ¶
func (x *RegisterReq) String() string
func (*RegisterReq) Validate ¶
func (m *RegisterReq) Validate() error
Validate checks the field values on RegisterReq 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 (*RegisterReq) ValidateAll ¶
func (m *RegisterReq) ValidateAll() error
ValidateAll checks the field values on RegisterReq 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 RegisterReqMultiError, or nil if none found.
type RegisterReqMultiError ¶
type RegisterReqMultiError []error
RegisterReqMultiError is an error wrapping multiple validation errors returned by RegisterReq.ValidateAll() if the designated constraints aren't met.
func (RegisterReqMultiError) AllErrors ¶
func (m RegisterReqMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (RegisterReqMultiError) Error ¶
func (m RegisterReqMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type RegisterReqValidationError ¶
type RegisterReqValidationError struct {
// contains filtered or unexported fields
}
RegisterReqValidationError is the validation error returned by RegisterReq.Validate if the designated constraints aren't met.
func (RegisterReqValidationError) Cause ¶
func (e RegisterReqValidationError) Cause() error
Cause function returns cause value.
func (RegisterReqValidationError) Error ¶
func (e RegisterReqValidationError) Error() string
Error satisfies the builtin error interface
func (RegisterReqValidationError) ErrorName ¶
func (e RegisterReqValidationError) ErrorName() string
ErrorName returns error name.
func (RegisterReqValidationError) Field ¶
func (e RegisterReqValidationError) Field() string
Field function returns field value.
func (RegisterReqValidationError) Key ¶
func (e RegisterReqValidationError) Key() bool
Key function returns key value.
func (RegisterReqValidationError) Reason ¶
func (e RegisterReqValidationError) Reason() string
Reason function returns reason value.
type UnimplementedCenterInterfaceServer ¶
type UnimplementedCenterInterfaceServer struct { }
UnimplementedCenterInterfaceServer must be embedded to have forward compatible implementations.
func (UnimplementedCenterInterfaceServer) Login ¶
func (UnimplementedCenterInterfaceServer) Login(context.Context, *LoginReq) (*LoginReply, error)
func (UnimplementedCenterInterfaceServer) Logout ¶
func (UnimplementedCenterInterfaceServer) Logout(context.Context, *LogoutReq) (*LogoutReply, error)
func (UnimplementedCenterInterfaceServer) Register ¶
func (UnimplementedCenterInterfaceServer) Register(context.Context, *RegisterReq) (*RegisterReply, error)
type UnsafeCenterInterfaceServer ¶
type UnsafeCenterInterfaceServer interface {
// contains filtered or unexported methods
}
UnsafeCenterInterfaceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to CenterInterfaceServer will result in compilation errors.