Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterLoginHTTPServer(s *http.Server, srv LoginHTTPServer)
- func RegisterLoginServer(s grpc.ServiceRegistrar, srv LoginServer)
- type ErrorReason
- func (ErrorReason) Descriptor() protoreflect.EnumDescriptor
- func (x ErrorReason) Enum() *ErrorReason
- func (ErrorReason) EnumDescriptor() ([]byte, []int)deprecated
- func (x ErrorReason) Number() protoreflect.EnumNumber
- func (x ErrorReason) String() string
- func (ErrorReason) Type() protoreflect.EnumType
- type LoginClient
- type LoginHTTPClient
- type LoginHTTPClientImpl
- type LoginHTTPServer
- type LoginOutReplyMultiError
- type LoginOutReplyValidationError
- func (e LoginOutReplyValidationError) Cause() error
- func (e LoginOutReplyValidationError) Error() string
- func (e LoginOutReplyValidationError) ErrorName() string
- func (e LoginOutReplyValidationError) Field() string
- func (e LoginOutReplyValidationError) Key() bool
- func (e LoginOutReplyValidationError) Reason() string
- type LoginOutRequestMultiError
- type LoginOutRequestValidationError
- func (e LoginOutRequestValidationError) Cause() error
- func (e LoginOutRequestValidationError) Error() string
- func (e LoginOutRequestValidationError) ErrorName() string
- func (e LoginOutRequestValidationError) Field() string
- func (e LoginOutRequestValidationError) Key() bool
- func (e LoginOutRequestValidationError) Reason() string
- type LoginReply
- func (*LoginReply) Descriptor() ([]byte, []int)deprecated
- func (x *LoginReply) GetToken() string
- func (x *LoginReply) GetUser() *UserInfo
- 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) GetAccount() string
- func (x *LoginRequest) GetPassword() 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 LoginServer
- type UnimplementedLoginServer
- type UnsafeLoginServer
- type UserInfo
- func (*UserInfo) Descriptor() ([]byte, []int)deprecated
- func (x *UserInfo) GetAccount() string
- func (x *UserInfo) GetAvatar() string
- func (x *UserInfo) GetNickName() string
- func (x *UserInfo) GetNum() string
- func (*UserInfo) ProtoMessage()
- func (x *UserInfo) ProtoReflect() protoreflect.Message
- func (x *UserInfo) Reset()
- func (x *UserInfo) String() string
- func (m *UserInfo) Validate() error
- func (m *UserInfo) ValidateAll() error
- type UserInfoMultiError
- type UserInfoValidationError
Constants ¶
const (
Login_Login_FullMethodName = "/layout.login.v1.Login/Login"
)
const OperationLoginLogin = "/layout.login.v1.Login/Login"
Variables ¶
var ( ErrorReason_name = map[int32]string{ 0: "USER_DOES_NOT_EXIST", 1: "INCORRECT_PASSWORD", 2: "ACCOUNT_HAS_BEEN_BANNED", 3: "LOGIN_ERROR", } ErrorReason_value = map[string]int32{ "USER_DOES_NOT_EXIST": 0, "INCORRECT_PASSWORD": 1, "ACCOUNT_HAS_BEEN_BANNED": 2, "LOGIN_ERROR": 3, } )
Enum value maps for ErrorReason.
var File_login_v1_error_reason_proto protoreflect.FileDescriptor
var File_login_v1_login_proto protoreflect.FileDescriptor
var Login_ServiceDesc = grpc.ServiceDesc{ ServiceName: "layout.login.v1.Login", HandlerType: (*LoginServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Login", Handler: _Login_Login_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "login/v1/login.proto", }
Login_ServiceDesc is the grpc.ServiceDesc for Login service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterLoginHTTPServer ¶
func RegisterLoginHTTPServer(s *http.Server, srv LoginHTTPServer)
func RegisterLoginServer ¶
func RegisterLoginServer(s grpc.ServiceRegistrar, srv LoginServer)
Types ¶
type ErrorReason ¶
type ErrorReason int32
const ( ErrorReason_USER_DOES_NOT_EXIST ErrorReason = 0 ErrorReason_INCORRECT_PASSWORD ErrorReason = 1 ErrorReason_ACCOUNT_HAS_BEEN_BANNED ErrorReason = 2 ErrorReason_LOGIN_ERROR ErrorReason = 3 )
func (ErrorReason) Descriptor ¶
func (ErrorReason) Descriptor() protoreflect.EnumDescriptor
func (ErrorReason) Enum ¶
func (x ErrorReason) Enum() *ErrorReason
func (ErrorReason) EnumDescriptor
deprecated
func (ErrorReason) EnumDescriptor() ([]byte, []int)
Deprecated: Use ErrorReason.Descriptor instead.
func (ErrorReason) Number ¶
func (x ErrorReason) Number() protoreflect.EnumNumber
func (ErrorReason) String ¶
func (x ErrorReason) String() string
func (ErrorReason) Type ¶
func (ErrorReason) Type() protoreflect.EnumType
type LoginClient ¶
type LoginClient interface {
Login(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*LoginReply, error)
}
LoginClient is the client API for Login 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 NewLoginClient ¶
func NewLoginClient(cc grpc.ClientConnInterface) LoginClient
type LoginHTTPClient ¶
type LoginHTTPClient interface {
Login(ctx context.Context, req *LoginRequest, opts ...http.CallOption) (rsp *LoginReply, err error)
}
func NewLoginHTTPClient ¶
func NewLoginHTTPClient(client *http.Client) LoginHTTPClient
type LoginHTTPClientImpl ¶
type LoginHTTPClientImpl struct {
// contains filtered or unexported fields
}
func (*LoginHTTPClientImpl) Login ¶
func (c *LoginHTTPClientImpl) Login(ctx context.Context, in *LoginRequest, opts ...http.CallOption) (*LoginReply, error)
type LoginHTTPServer ¶
type LoginHTTPServer interface {
Login(context.Context, *LoginRequest) (*LoginReply, error)
}
type LoginOutReplyMultiError ¶
type LoginOutReplyMultiError []error
LoginOutReplyMultiError is an error wrapping multiple validation errors returned by LoginOutReply.ValidateAll() if the designated constraints aren't met.
func (LoginOutReplyMultiError) AllErrors ¶
func (m LoginOutReplyMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (LoginOutReplyMultiError) Error ¶
func (m LoginOutReplyMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type LoginOutReplyValidationError ¶
type LoginOutReplyValidationError struct {
// contains filtered or unexported fields
}
LoginOutReplyValidationError is the validation error returned by LoginOutReply.Validate if the designated constraints aren't met.
func (LoginOutReplyValidationError) Cause ¶
func (e LoginOutReplyValidationError) Cause() error
Cause function returns cause value.
func (LoginOutReplyValidationError) Error ¶
func (e LoginOutReplyValidationError) Error() string
Error satisfies the builtin error interface
func (LoginOutReplyValidationError) ErrorName ¶
func (e LoginOutReplyValidationError) ErrorName() string
ErrorName returns error name.
func (LoginOutReplyValidationError) Field ¶
func (e LoginOutReplyValidationError) Field() string
Field function returns field value.
func (LoginOutReplyValidationError) Key ¶
func (e LoginOutReplyValidationError) Key() bool
Key function returns key value.
func (LoginOutReplyValidationError) Reason ¶
func (e LoginOutReplyValidationError) Reason() string
Reason function returns reason value.
type LoginOutRequestMultiError ¶
type LoginOutRequestMultiError []error
LoginOutRequestMultiError is an error wrapping multiple validation errors returned by LoginOutRequest.ValidateAll() if the designated constraints aren't met.
func (LoginOutRequestMultiError) AllErrors ¶
func (m LoginOutRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (LoginOutRequestMultiError) Error ¶
func (m LoginOutRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type LoginOutRequestValidationError ¶
type LoginOutRequestValidationError struct {
// contains filtered or unexported fields
}
LoginOutRequestValidationError is the validation error returned by LoginOutRequest.Validate if the designated constraints aren't met.
func (LoginOutRequestValidationError) Cause ¶
func (e LoginOutRequestValidationError) Cause() error
Cause function returns cause value.
func (LoginOutRequestValidationError) Error ¶
func (e LoginOutRequestValidationError) Error() string
Error satisfies the builtin error interface
func (LoginOutRequestValidationError) ErrorName ¶
func (e LoginOutRequestValidationError) ErrorName() string
ErrorName returns error name.
func (LoginOutRequestValidationError) Field ¶
func (e LoginOutRequestValidationError) Field() string
Field function returns field value.
func (LoginOutRequestValidationError) Key ¶
func (e LoginOutRequestValidationError) Key() bool
Key function returns key value.
func (LoginOutRequestValidationError) Reason ¶
func (e LoginOutRequestValidationError) Reason() string
Reason function returns reason value.
type LoginReply ¶
type LoginReply struct { Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` User *UserInfo `protobuf:"bytes,2,opt,name=user,proto3" json:"user,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) GetUser ¶
func (x *LoginReply) GetUser() *UserInfo
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 { Account string `protobuf:"bytes,1,opt,name=account,proto3" json:"account,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) GetAccount ¶
func (x *LoginRequest) GetAccount() string
func (*LoginRequest) GetPassword ¶
func (x *LoginRequest) GetPassword() 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 LoginServer ¶
type LoginServer interface { Login(context.Context, *LoginRequest) (*LoginReply, error) // contains filtered or unexported methods }
LoginServer is the server API for Login service. All implementations must embed UnimplementedLoginServer for forward compatibility
type UnimplementedLoginServer ¶
type UnimplementedLoginServer struct { }
UnimplementedLoginServer must be embedded to have forward compatible implementations.
func (UnimplementedLoginServer) Login ¶
func (UnimplementedLoginServer) Login(context.Context, *LoginRequest) (*LoginReply, error)
type UnsafeLoginServer ¶
type UnsafeLoginServer interface {
// contains filtered or unexported methods
}
UnsafeLoginServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to LoginServer will result in compilation errors.
type UserInfo ¶
type UserInfo struct { Num string `protobuf:"bytes,1,opt,name=num,proto3" json:"num,omitempty"` Account string `protobuf:"bytes,2,opt,name=account,proto3" json:"account,omitempty"` NickName string `protobuf:"bytes,3,opt,name=nickName,proto3" json:"nickName,omitempty"` Avatar string `protobuf:"bytes,4,opt,name=avatar,proto3" json:"avatar,omitempty"` // contains filtered or unexported fields }
func (*UserInfo) Descriptor
deprecated
func (*UserInfo) GetAccount ¶
func (*UserInfo) GetNickName ¶
func (*UserInfo) ProtoMessage ¶
func (*UserInfo) ProtoMessage()
func (*UserInfo) ProtoReflect ¶
func (x *UserInfo) ProtoReflect() protoreflect.Message
func (*UserInfo) Validate ¶
Validate checks the field values on UserInfo 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 (*UserInfo) ValidateAll ¶
ValidateAll checks the field values on UserInfo 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 UserInfoMultiError, or nil if none found.
type UserInfoMultiError ¶
type UserInfoMultiError []error
UserInfoMultiError is an error wrapping multiple validation errors returned by UserInfo.ValidateAll() if the designated constraints aren't met.
func (UserInfoMultiError) AllErrors ¶
func (m UserInfoMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (UserInfoMultiError) Error ¶
func (m UserInfoMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type UserInfoValidationError ¶
type UserInfoValidationError struct {
// contains filtered or unexported fields
}
UserInfoValidationError is the validation error returned by UserInfo.Validate if the designated constraints aren't met.
func (UserInfoValidationError) Cause ¶
func (e UserInfoValidationError) Cause() error
Cause function returns cause value.
func (UserInfoValidationError) Error ¶
func (e UserInfoValidationError) Error() string
Error satisfies the builtin error interface
func (UserInfoValidationError) ErrorName ¶
func (e UserInfoValidationError) ErrorName() string
ErrorName returns error name.
func (UserInfoValidationError) Field ¶
func (e UserInfoValidationError) Field() string
Field function returns field value.
func (UserInfoValidationError) Key ¶
func (e UserInfoValidationError) Key() bool
Key function returns key value.
func (UserInfoValidationError) Reason ¶
func (e UserInfoValidationError) Reason() string
Reason function returns reason value.