Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterUserHTTPServer(s *http.Server, srv UserHTTPServer)
- func RegisterUserServer(s grpc.ServiceRegistrar, srv UserServer)
- 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 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 RefreshTokenReply
- func (*RefreshTokenReply) Descriptor() ([]byte, []int)deprecated
- func (x *RefreshTokenReply) GetToken() string
- func (*RefreshTokenReply) ProtoMessage()
- func (x *RefreshTokenReply) ProtoReflect() protoreflect.Message
- func (x *RefreshTokenReply) Reset()
- func (x *RefreshTokenReply) String() string
- func (m *RefreshTokenReply) Validate() error
- func (m *RefreshTokenReply) ValidateAll() error
- type RefreshTokenReplyMultiError
- type RefreshTokenReplyValidationError
- func (e RefreshTokenReplyValidationError) Cause() error
- func (e RefreshTokenReplyValidationError) Error() string
- func (e RefreshTokenReplyValidationError) ErrorName() string
- func (e RefreshTokenReplyValidationError) Field() string
- func (e RefreshTokenReplyValidationError) Key() bool
- func (e RefreshTokenReplyValidationError) Reason() string
- type RefreshTokenRequest
- func (*RefreshTokenRequest) Descriptor() ([]byte, []int)deprecated
- func (*RefreshTokenRequest) ProtoMessage()
- func (x *RefreshTokenRequest) ProtoReflect() protoreflect.Message
- func (x *RefreshTokenRequest) Reset()
- func (x *RefreshTokenRequest) String() string
- func (m *RefreshTokenRequest) Validate() error
- func (m *RefreshTokenRequest) ValidateAll() error
- type RefreshTokenRequestMultiError
- type RefreshTokenRequestValidationError
- func (e RefreshTokenRequestValidationError) Cause() error
- func (e RefreshTokenRequestValidationError) Error() string
- func (e RefreshTokenRequestValidationError) ErrorName() string
- func (e RefreshTokenRequestValidationError) Field() string
- func (e RefreshTokenRequestValidationError) Key() bool
- func (e RefreshTokenRequestValidationError) Reason() string
- type UnimplementedUserServer
- type UnsafeUserServer
- type UserClient
- type UserHTTPClient
- type UserHTTPClientImpl
- type UserHTTPServer
- type UserServer
Constants ¶
const ( User_Login_FullMethodName = "/wilson.api.configure.user.v1.User/Login" User_RefreshToken_FullMethodName = "/wilson.api.configure.user.v1.User/RefreshToken" )
const OperationUserLogin = "/wilson.api.configure.user.v1.User/Login"
const OperationUserRefreshToken = "/wilson.api.configure.user.v1.User/RefreshToken"
Variables ¶
var File_configure_user_v1_configure_user_proto protoreflect.FileDescriptor
var File_configure_user_v1_configure_user_service_proto protoreflect.FileDescriptor
var User_ServiceDesc = grpc.ServiceDesc{ ServiceName: "wilson.api.configure.user.v1.User", HandlerType: (*UserServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Login", Handler: _User_Login_Handler, }, { MethodName: "RefreshToken", Handler: _User_RefreshToken_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "configure/user/v1/configure_user_service.proto", }
User_ServiceDesc is the grpc.ServiceDesc for User service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterUserHTTPServer ¶
func RegisterUserHTTPServer(s *http.Server, srv UserHTTPServer)
func RegisterUserServer ¶
func RegisterUserServer(s grpc.ServiceRegistrar, srv UserServer)
Types ¶
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 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 RefreshTokenReply ¶
type RefreshTokenReply struct { Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` // contains filtered or unexported fields }
func (*RefreshTokenReply) Descriptor
deprecated
func (*RefreshTokenReply) Descriptor() ([]byte, []int)
Deprecated: Use RefreshTokenReply.ProtoReflect.Descriptor instead.
func (*RefreshTokenReply) GetToken ¶
func (x *RefreshTokenReply) GetToken() string
func (*RefreshTokenReply) ProtoMessage ¶
func (*RefreshTokenReply) ProtoMessage()
func (*RefreshTokenReply) ProtoReflect ¶
func (x *RefreshTokenReply) ProtoReflect() protoreflect.Message
func (*RefreshTokenReply) Reset ¶
func (x *RefreshTokenReply) Reset()
func (*RefreshTokenReply) String ¶
func (x *RefreshTokenReply) String() string
func (*RefreshTokenReply) Validate ¶
func (m *RefreshTokenReply) Validate() error
Validate checks the field values on RefreshTokenReply 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 (*RefreshTokenReply) ValidateAll ¶
func (m *RefreshTokenReply) ValidateAll() error
ValidateAll checks the field values on RefreshTokenReply 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 RefreshTokenReplyMultiError, or nil if none found.
type RefreshTokenReplyMultiError ¶
type RefreshTokenReplyMultiError []error
RefreshTokenReplyMultiError is an error wrapping multiple validation errors returned by RefreshTokenReply.ValidateAll() if the designated constraints aren't met.
func (RefreshTokenReplyMultiError) AllErrors ¶
func (m RefreshTokenReplyMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (RefreshTokenReplyMultiError) Error ¶
func (m RefreshTokenReplyMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type RefreshTokenReplyValidationError ¶
type RefreshTokenReplyValidationError struct {
// contains filtered or unexported fields
}
RefreshTokenReplyValidationError is the validation error returned by RefreshTokenReply.Validate if the designated constraints aren't met.
func (RefreshTokenReplyValidationError) Cause ¶
func (e RefreshTokenReplyValidationError) Cause() error
Cause function returns cause value.
func (RefreshTokenReplyValidationError) Error ¶
func (e RefreshTokenReplyValidationError) Error() string
Error satisfies the builtin error interface
func (RefreshTokenReplyValidationError) ErrorName ¶
func (e RefreshTokenReplyValidationError) ErrorName() string
ErrorName returns error name.
func (RefreshTokenReplyValidationError) Field ¶
func (e RefreshTokenReplyValidationError) Field() string
Field function returns field value.
func (RefreshTokenReplyValidationError) Key ¶
func (e RefreshTokenReplyValidationError) Key() bool
Key function returns key value.
func (RefreshTokenReplyValidationError) Reason ¶
func (e RefreshTokenReplyValidationError) Reason() string
Reason function returns reason value.
type RefreshTokenRequest ¶
type RefreshTokenRequest struct {
// contains filtered or unexported fields
}
func (*RefreshTokenRequest) Descriptor
deprecated
func (*RefreshTokenRequest) Descriptor() ([]byte, []int)
Deprecated: Use RefreshTokenRequest.ProtoReflect.Descriptor instead.
func (*RefreshTokenRequest) ProtoMessage ¶
func (*RefreshTokenRequest) ProtoMessage()
func (*RefreshTokenRequest) ProtoReflect ¶
func (x *RefreshTokenRequest) ProtoReflect() protoreflect.Message
func (*RefreshTokenRequest) Reset ¶
func (x *RefreshTokenRequest) Reset()
func (*RefreshTokenRequest) String ¶
func (x *RefreshTokenRequest) String() string
func (*RefreshTokenRequest) Validate ¶
func (m *RefreshTokenRequest) Validate() error
Validate checks the field values on RefreshTokenRequest 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 (*RefreshTokenRequest) ValidateAll ¶
func (m *RefreshTokenRequest) ValidateAll() error
ValidateAll checks the field values on RefreshTokenRequest 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 RefreshTokenRequestMultiError, or nil if none found.
type RefreshTokenRequestMultiError ¶
type RefreshTokenRequestMultiError []error
RefreshTokenRequestMultiError is an error wrapping multiple validation errors returned by RefreshTokenRequest.ValidateAll() if the designated constraints aren't met.
func (RefreshTokenRequestMultiError) AllErrors ¶
func (m RefreshTokenRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (RefreshTokenRequestMultiError) Error ¶
func (m RefreshTokenRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type RefreshTokenRequestValidationError ¶
type RefreshTokenRequestValidationError struct {
// contains filtered or unexported fields
}
RefreshTokenRequestValidationError is the validation error returned by RefreshTokenRequest.Validate if the designated constraints aren't met.
func (RefreshTokenRequestValidationError) Cause ¶
func (e RefreshTokenRequestValidationError) Cause() error
Cause function returns cause value.
func (RefreshTokenRequestValidationError) Error ¶
func (e RefreshTokenRequestValidationError) Error() string
Error satisfies the builtin error interface
func (RefreshTokenRequestValidationError) ErrorName ¶
func (e RefreshTokenRequestValidationError) ErrorName() string
ErrorName returns error name.
func (RefreshTokenRequestValidationError) Field ¶
func (e RefreshTokenRequestValidationError) Field() string
Field function returns field value.
func (RefreshTokenRequestValidationError) Key ¶
func (e RefreshTokenRequestValidationError) Key() bool
Key function returns key value.
func (RefreshTokenRequestValidationError) Reason ¶
func (e RefreshTokenRequestValidationError) Reason() string
Reason function returns reason value.
type UnimplementedUserServer ¶
type UnimplementedUserServer struct{}
UnimplementedUserServer must be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
func (UnimplementedUserServer) Login ¶
func (UnimplementedUserServer) Login(context.Context, *LoginRequest) (*LoginReply, error)
func (UnimplementedUserServer) RefreshToken ¶
func (UnimplementedUserServer) RefreshToken(context.Context, *RefreshTokenRequest) (*RefreshTokenReply, error)
type UnsafeUserServer ¶
type UnsafeUserServer interface {
// contains filtered or unexported methods
}
UnsafeUserServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to UserServer will result in compilation errors.
type UserClient ¶
type UserClient interface { // 用户登录 Login(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*LoginReply, error) // RefreshToken 刷新token RefreshToken(ctx context.Context, in *RefreshTokenRequest, opts ...grpc.CallOption) (*RefreshTokenReply, error) }
UserClient is the client API for User 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 NewUserClient ¶
func NewUserClient(cc grpc.ClientConnInterface) UserClient
type UserHTTPClient ¶
type UserHTTPClient interface { Login(ctx context.Context, req *LoginRequest, opts ...http.CallOption) (rsp *LoginReply, err error) RefreshToken(ctx context.Context, req *RefreshTokenRequest, opts ...http.CallOption) (rsp *RefreshTokenReply, err error) }
func NewUserHTTPClient ¶
func NewUserHTTPClient(client *http.Client) UserHTTPClient
type UserHTTPClientImpl ¶
type UserHTTPClientImpl struct {
// contains filtered or unexported fields
}
func (*UserHTTPClientImpl) Login ¶
func (c *UserHTTPClientImpl) Login(ctx context.Context, in *LoginRequest, opts ...http.CallOption) (*LoginReply, error)
func (*UserHTTPClientImpl) RefreshToken ¶
func (c *UserHTTPClientImpl) RefreshToken(ctx context.Context, in *RefreshTokenRequest, opts ...http.CallOption) (*RefreshTokenReply, error)
type UserHTTPServer ¶
type UserHTTPServer interface { // Login 用户登录 Login(context.Context, *LoginRequest) (*LoginReply, error) // RefreshToken RefreshToken 刷新token RefreshToken(context.Context, *RefreshTokenRequest) (*RefreshTokenReply, error) }
type UserServer ¶
type UserServer interface { // 用户登录 Login(context.Context, *LoginRequest) (*LoginReply, error) // RefreshToken 刷新token RefreshToken(context.Context, *RefreshTokenRequest) (*RefreshTokenReply, error) // contains filtered or unexported methods }
UserServer is the server API for User service. All implementations must embed UnimplementedUserServer for forward compatibility.