Documentation ¶
Index ¶
- Variables
- func RegisterTokenServer(s grpc.ServiceRegistrar, srv TokenServer)
- type GenerateTokenRequest
- func (*GenerateTokenRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GenerateTokenRequest) GetUserID() uint64
- func (*GenerateTokenRequest) ProtoMessage()
- func (x *GenerateTokenRequest) ProtoReflect() protoreflect.Message
- func (x *GenerateTokenRequest) Reset()
- func (x *GenerateTokenRequest) String() string
- func (m *GenerateTokenRequest) Validate() error
- func (m *GenerateTokenRequest) ValidateAll() error
- type GenerateTokenRequestMultiError
- type GenerateTokenRequestValidationError
- func (e GenerateTokenRequestValidationError) Cause() error
- func (e GenerateTokenRequestValidationError) Error() string
- func (e GenerateTokenRequestValidationError) ErrorName() string
- func (e GenerateTokenRequestValidationError) Field() string
- func (e GenerateTokenRequestValidationError) Key() bool
- func (e GenerateTokenRequestValidationError) Reason() string
- type TokenClient
- type TokenResponse
- func (*TokenResponse) Descriptor() ([]byte, []int)deprecated
- func (x *TokenResponse) GetToken() string
- func (*TokenResponse) ProtoMessage()
- func (x *TokenResponse) ProtoReflect() protoreflect.Message
- func (x *TokenResponse) Reset()
- func (x *TokenResponse) String() string
- func (m *TokenResponse) Validate() error
- func (m *TokenResponse) ValidateAll() error
- type TokenResponseMultiError
- type TokenResponseValidationError
- func (e TokenResponseValidationError) Cause() error
- func (e TokenResponseValidationError) Error() string
- func (e TokenResponseValidationError) ErrorName() string
- func (e TokenResponseValidationError) Field() string
- func (e TokenResponseValidationError) Key() bool
- func (e TokenResponseValidationError) Reason() string
- type TokenServer
- type UnimplementedTokenServer
- type UnsafeTokenServer
Constants ¶
This section is empty.
Variables ¶
var File_token_proto protoreflect.FileDescriptor
var Token_ServiceDesc = grpc.ServiceDesc{ ServiceName: "Token", HandlerType: (*TokenServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GenerateToken", Handler: _Token_GenerateToken_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "token.proto", }
Token_ServiceDesc is the grpc.ServiceDesc for Token service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterTokenServer ¶
func RegisterTokenServer(s grpc.ServiceRegistrar, srv TokenServer)
Types ¶
type GenerateTokenRequest ¶
type GenerateTokenRequest struct { UserID uint64 `protobuf:"varint,1,opt,name=UserID,proto3" json:"UserID,omitempty"` // contains filtered or unexported fields }
func (*GenerateTokenRequest) Descriptor
deprecated
func (*GenerateTokenRequest) Descriptor() ([]byte, []int)
Deprecated: Use GenerateTokenRequest.ProtoReflect.Descriptor instead.
func (*GenerateTokenRequest) GetUserID ¶
func (x *GenerateTokenRequest) GetUserID() uint64
func (*GenerateTokenRequest) ProtoMessage ¶
func (*GenerateTokenRequest) ProtoMessage()
func (*GenerateTokenRequest) ProtoReflect ¶
func (x *GenerateTokenRequest) ProtoReflect() protoreflect.Message
func (*GenerateTokenRequest) Reset ¶
func (x *GenerateTokenRequest) Reset()
func (*GenerateTokenRequest) String ¶
func (x *GenerateTokenRequest) String() string
func (*GenerateTokenRequest) Validate ¶
func (m *GenerateTokenRequest) Validate() error
Validate checks the field values on GenerateTokenRequest 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 (*GenerateTokenRequest) ValidateAll ¶
func (m *GenerateTokenRequest) ValidateAll() error
ValidateAll checks the field values on GenerateTokenRequest 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 GenerateTokenRequestMultiError, or nil if none found.
type GenerateTokenRequestMultiError ¶
type GenerateTokenRequestMultiError []error
GenerateTokenRequestMultiError is an error wrapping multiple validation errors returned by GenerateTokenRequest.ValidateAll() if the designated constraints aren't met.
func (GenerateTokenRequestMultiError) AllErrors ¶
func (m GenerateTokenRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (GenerateTokenRequestMultiError) Error ¶
func (m GenerateTokenRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type GenerateTokenRequestValidationError ¶
type GenerateTokenRequestValidationError struct {
// contains filtered or unexported fields
}
GenerateTokenRequestValidationError is the validation error returned by GenerateTokenRequest.Validate if the designated constraints aren't met.
func (GenerateTokenRequestValidationError) Cause ¶
func (e GenerateTokenRequestValidationError) Cause() error
Cause function returns cause value.
func (GenerateTokenRequestValidationError) Error ¶
func (e GenerateTokenRequestValidationError) Error() string
Error satisfies the builtin error interface
func (GenerateTokenRequestValidationError) ErrorName ¶
func (e GenerateTokenRequestValidationError) ErrorName() string
ErrorName returns error name.
func (GenerateTokenRequestValidationError) Field ¶
func (e GenerateTokenRequestValidationError) Field() string
Field function returns field value.
func (GenerateTokenRequestValidationError) Key ¶
func (e GenerateTokenRequestValidationError) Key() bool
Key function returns key value.
func (GenerateTokenRequestValidationError) Reason ¶
func (e GenerateTokenRequestValidationError) Reason() string
Reason function returns reason value.
type TokenClient ¶
type TokenClient interface {
GenerateToken(ctx context.Context, in *GenerateTokenRequest, opts ...grpc.CallOption) (*TokenResponse, error)
}
TokenClient is the client API for Token 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 NewTokenClient ¶
func NewTokenClient(cc grpc.ClientConnInterface) TokenClient
type TokenResponse ¶
type TokenResponse struct { Token string `protobuf:"bytes,1,opt,name=Token,proto3" json:"Token,omitempty"` // contains filtered or unexported fields }
func (*TokenResponse) Descriptor
deprecated
func (*TokenResponse) Descriptor() ([]byte, []int)
Deprecated: Use TokenResponse.ProtoReflect.Descriptor instead.
func (*TokenResponse) GetToken ¶
func (x *TokenResponse) GetToken() string
func (*TokenResponse) ProtoMessage ¶
func (*TokenResponse) ProtoMessage()
func (*TokenResponse) ProtoReflect ¶
func (x *TokenResponse) ProtoReflect() protoreflect.Message
func (*TokenResponse) Reset ¶
func (x *TokenResponse) Reset()
func (*TokenResponse) String ¶
func (x *TokenResponse) String() string
func (*TokenResponse) Validate ¶
func (m *TokenResponse) Validate() error
Validate checks the field values on TokenResponse 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 (*TokenResponse) ValidateAll ¶
func (m *TokenResponse) ValidateAll() error
ValidateAll checks the field values on TokenResponse 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 TokenResponseMultiError, or nil if none found.
type TokenResponseMultiError ¶
type TokenResponseMultiError []error
TokenResponseMultiError is an error wrapping multiple validation errors returned by TokenResponse.ValidateAll() if the designated constraints aren't met.
func (TokenResponseMultiError) AllErrors ¶
func (m TokenResponseMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (TokenResponseMultiError) Error ¶
func (m TokenResponseMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type TokenResponseValidationError ¶
type TokenResponseValidationError struct {
// contains filtered or unexported fields
}
TokenResponseValidationError is the validation error returned by TokenResponse.Validate if the designated constraints aren't met.
func (TokenResponseValidationError) Cause ¶
func (e TokenResponseValidationError) Cause() error
Cause function returns cause value.
func (TokenResponseValidationError) Error ¶
func (e TokenResponseValidationError) Error() string
Error satisfies the builtin error interface
func (TokenResponseValidationError) ErrorName ¶
func (e TokenResponseValidationError) ErrorName() string
ErrorName returns error name.
func (TokenResponseValidationError) Field ¶
func (e TokenResponseValidationError) Field() string
Field function returns field value.
func (TokenResponseValidationError) Key ¶
func (e TokenResponseValidationError) Key() bool
Key function returns key value.
func (TokenResponseValidationError) Reason ¶
func (e TokenResponseValidationError) Reason() string
Reason function returns reason value.
type TokenServer ¶
type TokenServer interface { GenerateToken(context.Context, *GenerateTokenRequest) (*TokenResponse, error) // contains filtered or unexported methods }
TokenServer is the server API for Token service. All implementations must embed UnimplementedTokenServer for forward compatibility
type UnimplementedTokenServer ¶
type UnimplementedTokenServer struct { }
UnimplementedTokenServer must be embedded to have forward compatible implementations.
func (UnimplementedTokenServer) GenerateToken ¶
func (UnimplementedTokenServer) GenerateToken(context.Context, *GenerateTokenRequest) (*TokenResponse, error)
type UnsafeTokenServer ¶
type UnsafeTokenServer interface {
// contains filtered or unexported methods
}
UnsafeTokenServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to TokenServer will result in compilation errors.