Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterServiceHTTPServer(s *http.Server, srv ServiceHTTPServer)
- func RegisterServiceServer(s grpc.ServiceRegistrar, srv ServiceServer)
- type AuthReply
- func (*AuthReply) Descriptor() ([]byte, []int)deprecated
- func (x *AuthReply) GetScope() map[string]*AuthReply_Scope
- func (*AuthReply) ProtoMessage()
- func (x *AuthReply) ProtoReflect() protoreflect.Message
- func (x *AuthReply) Reset()
- func (x *AuthReply) String() string
- func (m *AuthReply) Validate() error
- func (m *AuthReply) ValidateAll() error
- type AuthReplyMultiError
- type AuthReplyValidationError
- type AuthReply_Scope
- func (*AuthReply_Scope) Descriptor() ([]byte, []int)deprecated
- func (x *AuthReply_Scope) GetList() []string
- func (*AuthReply_Scope) ProtoMessage()
- func (x *AuthReply_Scope) ProtoReflect() protoreflect.Message
- func (x *AuthReply_Scope) Reset()
- func (x *AuthReply_Scope) String() string
- func (m *AuthReply_Scope) Validate() error
- func (m *AuthReply_Scope) ValidateAll() error
- type AuthReply_ScopeMultiError
- type AuthReply_ScopeValidationError
- func (e AuthReply_ScopeValidationError) Cause() error
- func (e AuthReply_ScopeValidationError) Error() string
- func (e AuthReply_ScopeValidationError) ErrorName() string
- func (e AuthReply_ScopeValidationError) Field() string
- func (e AuthReply_ScopeValidationError) Key() bool
- func (e AuthReply_ScopeValidationError) Reason() string
- type AuthRequest
- func (*AuthRequest) Descriptor() ([]byte, []int)deprecated
- func (x *AuthRequest) GetData() *structpb.Value
- func (x *AuthRequest) GetMethod() string
- func (x *AuthRequest) GetPath() string
- func (*AuthRequest) ProtoMessage()
- func (x *AuthRequest) ProtoReflect() protoreflect.Message
- func (x *AuthRequest) Reset()
- func (x *AuthRequest) String() string
- func (m *AuthRequest) Validate() error
- func (m *AuthRequest) ValidateAll() error
- type AuthRequestMultiError
- type AuthRequestValidationError
- func (e AuthRequestValidationError) Cause() error
- func (e AuthRequestValidationError) Error() string
- func (e AuthRequestValidationError) ErrorName() string
- func (e AuthRequestValidationError) Field() string
- func (e AuthRequestValidationError) Key() bool
- func (e AuthRequestValidationError) Reason() string
- type ParseTokenReply
- func (*ParseTokenReply) Descriptor() ([]byte, []int)deprecated
- func (x *ParseTokenReply) GetRoleId() uint32
- func (x *ParseTokenReply) GetUserId() uint32
- func (*ParseTokenReply) ProtoMessage()
- func (x *ParseTokenReply) ProtoReflect() protoreflect.Message
- func (x *ParseTokenReply) Reset()
- func (x *ParseTokenReply) String() string
- func (m *ParseTokenReply) Validate() error
- func (m *ParseTokenReply) ValidateAll() error
- type ParseTokenReplyMultiError
- type ParseTokenReplyValidationError
- func (e ParseTokenReplyValidationError) Cause() error
- func (e ParseTokenReplyValidationError) Error() string
- func (e ParseTokenReplyValidationError) ErrorName() string
- func (e ParseTokenReplyValidationError) Field() string
- func (e ParseTokenReplyValidationError) Key() bool
- func (e ParseTokenReplyValidationError) Reason() string
- type ServiceClient
- type ServiceHTTPClient
- type ServiceHTTPClientImpl
- type ServiceHTTPServer
- type ServiceServer
- type UnimplementedServiceServer
- type UnsafeServiceServer
Constants ¶
const ( Service_Auth_FullMethodName = "/manager_auth.Service/Auth" Service_ParseToken_FullMethodName = "/manager_auth.Service/ParseToken" )
const OperationServiceAuth = "/manager_auth.Service/Auth"
const OperationServiceParseToken = "/manager_auth.Service/ParseToken"
Variables ¶
var File_manager_auth_proto protoreflect.FileDescriptor
var File_manager_auth_service_proto protoreflect.FileDescriptor
var Service_ServiceDesc = grpc.ServiceDesc{ ServiceName: "manager_auth.Service", HandlerType: (*ServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Auth", Handler: _Service_Auth_Handler, }, { MethodName: "ParseToken", Handler: _Service_ParseToken_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "manager_auth_service.proto", }
Service_ServiceDesc is the grpc.ServiceDesc for Service service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterServiceHTTPServer ¶
func RegisterServiceHTTPServer(s *http.Server, srv ServiceHTTPServer)
func RegisterServiceServer ¶
func RegisterServiceServer(s grpc.ServiceRegistrar, srv ServiceServer)
Types ¶
type AuthReply ¶
type AuthReply struct { Scope map[string]*AuthReply_Scope `` /* 151-byte string literal not displayed */ // contains filtered or unexported fields }
func (*AuthReply) Descriptor
deprecated
func (*AuthReply) GetScope ¶
func (x *AuthReply) GetScope() map[string]*AuthReply_Scope
func (*AuthReply) ProtoMessage ¶
func (*AuthReply) ProtoMessage()
func (*AuthReply) ProtoReflect ¶
func (x *AuthReply) ProtoReflect() protoreflect.Message
func (*AuthReply) Validate ¶
Validate checks the field values on AuthReply 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 (*AuthReply) ValidateAll ¶
ValidateAll checks the field values on AuthReply 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 AuthReplyMultiError, or nil if none found.
type AuthReplyMultiError ¶
type AuthReplyMultiError []error
AuthReplyMultiError is an error wrapping multiple validation errors returned by AuthReply.ValidateAll() if the designated constraints aren't met.
func (AuthReplyMultiError) AllErrors ¶
func (m AuthReplyMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (AuthReplyMultiError) Error ¶
func (m AuthReplyMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type AuthReplyValidationError ¶
type AuthReplyValidationError struct {
// contains filtered or unexported fields
}
AuthReplyValidationError is the validation error returned by AuthReply.Validate if the designated constraints aren't met.
func (AuthReplyValidationError) Cause ¶
func (e AuthReplyValidationError) Cause() error
Cause function returns cause value.
func (AuthReplyValidationError) Error ¶
func (e AuthReplyValidationError) Error() string
Error satisfies the builtin error interface
func (AuthReplyValidationError) ErrorName ¶
func (e AuthReplyValidationError) ErrorName() string
ErrorName returns error name.
func (AuthReplyValidationError) Field ¶
func (e AuthReplyValidationError) Field() string
Field function returns field value.
func (AuthReplyValidationError) Key ¶
func (e AuthReplyValidationError) Key() bool
Key function returns key value.
func (AuthReplyValidationError) Reason ¶
func (e AuthReplyValidationError) Reason() string
Reason function returns reason value.
type AuthReply_Scope ¶
type AuthReply_Scope struct { List []string `protobuf:"bytes,1,rep,name=list,proto3" json:"list,omitempty"` // contains filtered or unexported fields }
func (*AuthReply_Scope) Descriptor
deprecated
func (*AuthReply_Scope) Descriptor() ([]byte, []int)
Deprecated: Use AuthReply_Scope.ProtoReflect.Descriptor instead.
func (*AuthReply_Scope) GetList ¶
func (x *AuthReply_Scope) GetList() []string
func (*AuthReply_Scope) ProtoMessage ¶
func (*AuthReply_Scope) ProtoMessage()
func (*AuthReply_Scope) ProtoReflect ¶
func (x *AuthReply_Scope) ProtoReflect() protoreflect.Message
func (*AuthReply_Scope) Reset ¶
func (x *AuthReply_Scope) Reset()
func (*AuthReply_Scope) String ¶
func (x *AuthReply_Scope) String() string
func (*AuthReply_Scope) Validate ¶
func (m *AuthReply_Scope) Validate() error
Validate checks the field values on AuthReply_Scope 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 (*AuthReply_Scope) ValidateAll ¶
func (m *AuthReply_Scope) ValidateAll() error
ValidateAll checks the field values on AuthReply_Scope 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 AuthReply_ScopeMultiError, or nil if none found.
type AuthReply_ScopeMultiError ¶
type AuthReply_ScopeMultiError []error
AuthReply_ScopeMultiError is an error wrapping multiple validation errors returned by AuthReply_Scope.ValidateAll() if the designated constraints aren't met.
func (AuthReply_ScopeMultiError) AllErrors ¶
func (m AuthReply_ScopeMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (AuthReply_ScopeMultiError) Error ¶
func (m AuthReply_ScopeMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type AuthReply_ScopeValidationError ¶
type AuthReply_ScopeValidationError struct {
// contains filtered or unexported fields
}
AuthReply_ScopeValidationError is the validation error returned by AuthReply_Scope.Validate if the designated constraints aren't met.
func (AuthReply_ScopeValidationError) Cause ¶
func (e AuthReply_ScopeValidationError) Cause() error
Cause function returns cause value.
func (AuthReply_ScopeValidationError) Error ¶
func (e AuthReply_ScopeValidationError) Error() string
Error satisfies the builtin error interface
func (AuthReply_ScopeValidationError) ErrorName ¶
func (e AuthReply_ScopeValidationError) ErrorName() string
ErrorName returns error name.
func (AuthReply_ScopeValidationError) Field ¶
func (e AuthReply_ScopeValidationError) Field() string
Field function returns field value.
func (AuthReply_ScopeValidationError) Key ¶
func (e AuthReply_ScopeValidationError) Key() bool
Key function returns key value.
func (AuthReply_ScopeValidationError) Reason ¶
func (e AuthReply_ScopeValidationError) Reason() string
Reason function returns reason value.
type AuthRequest ¶
type AuthRequest struct { Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` Method string `protobuf:"bytes,2,opt,name=method,proto3" json:"method,omitempty"` Data *structpb.Value `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` // contains filtered or unexported fields }
func (*AuthRequest) Descriptor
deprecated
func (*AuthRequest) Descriptor() ([]byte, []int)
Deprecated: Use AuthRequest.ProtoReflect.Descriptor instead.
func (*AuthRequest) GetData ¶
func (x *AuthRequest) GetData() *structpb.Value
func (*AuthRequest) GetMethod ¶
func (x *AuthRequest) GetMethod() string
func (*AuthRequest) GetPath ¶
func (x *AuthRequest) GetPath() string
func (*AuthRequest) ProtoMessage ¶
func (*AuthRequest) ProtoMessage()
func (*AuthRequest) ProtoReflect ¶
func (x *AuthRequest) ProtoReflect() protoreflect.Message
func (*AuthRequest) Reset ¶
func (x *AuthRequest) Reset()
func (*AuthRequest) String ¶
func (x *AuthRequest) String() string
func (*AuthRequest) Validate ¶
func (m *AuthRequest) Validate() error
Validate checks the field values on AuthRequest 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 (*AuthRequest) ValidateAll ¶
func (m *AuthRequest) ValidateAll() error
ValidateAll checks the field values on AuthRequest 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 AuthRequestMultiError, or nil if none found.
type AuthRequestMultiError ¶
type AuthRequestMultiError []error
AuthRequestMultiError is an error wrapping multiple validation errors returned by AuthRequest.ValidateAll() if the designated constraints aren't met.
func (AuthRequestMultiError) AllErrors ¶
func (m AuthRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (AuthRequestMultiError) Error ¶
func (m AuthRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type AuthRequestValidationError ¶
type AuthRequestValidationError struct {
// contains filtered or unexported fields
}
AuthRequestValidationError is the validation error returned by AuthRequest.Validate if the designated constraints aren't met.
func (AuthRequestValidationError) Cause ¶
func (e AuthRequestValidationError) Cause() error
Cause function returns cause value.
func (AuthRequestValidationError) Error ¶
func (e AuthRequestValidationError) Error() string
Error satisfies the builtin error interface
func (AuthRequestValidationError) ErrorName ¶
func (e AuthRequestValidationError) ErrorName() string
ErrorName returns error name.
func (AuthRequestValidationError) Field ¶
func (e AuthRequestValidationError) Field() string
Field function returns field value.
func (AuthRequestValidationError) Key ¶
func (e AuthRequestValidationError) Key() bool
Key function returns key value.
func (AuthRequestValidationError) Reason ¶
func (e AuthRequestValidationError) Reason() string
Reason function returns reason value.
type ParseTokenReply ¶
type ParseTokenReply struct { UserId uint32 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` RoleId uint32 `protobuf:"varint,2,opt,name=role_id,json=roleId,proto3" json:"role_id,omitempty"` // contains filtered or unexported fields }
func (*ParseTokenReply) Descriptor
deprecated
func (*ParseTokenReply) Descriptor() ([]byte, []int)
Deprecated: Use ParseTokenReply.ProtoReflect.Descriptor instead.
func (*ParseTokenReply) GetRoleId ¶
func (x *ParseTokenReply) GetRoleId() uint32
func (*ParseTokenReply) GetUserId ¶
func (x *ParseTokenReply) GetUserId() uint32
func (*ParseTokenReply) ProtoMessage ¶
func (*ParseTokenReply) ProtoMessage()
func (*ParseTokenReply) ProtoReflect ¶
func (x *ParseTokenReply) ProtoReflect() protoreflect.Message
func (*ParseTokenReply) Reset ¶
func (x *ParseTokenReply) Reset()
func (*ParseTokenReply) String ¶
func (x *ParseTokenReply) String() string
func (*ParseTokenReply) Validate ¶
func (m *ParseTokenReply) Validate() error
Validate checks the field values on ParseTokenReply 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 (*ParseTokenReply) ValidateAll ¶
func (m *ParseTokenReply) ValidateAll() error
ValidateAll checks the field values on ParseTokenReply 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 ParseTokenReplyMultiError, or nil if none found.
type ParseTokenReplyMultiError ¶
type ParseTokenReplyMultiError []error
ParseTokenReplyMultiError is an error wrapping multiple validation errors returned by ParseTokenReply.ValidateAll() if the designated constraints aren't met.
func (ParseTokenReplyMultiError) AllErrors ¶
func (m ParseTokenReplyMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (ParseTokenReplyMultiError) Error ¶
func (m ParseTokenReplyMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type ParseTokenReplyValidationError ¶
type ParseTokenReplyValidationError struct {
// contains filtered or unexported fields
}
ParseTokenReplyValidationError is the validation error returned by ParseTokenReply.Validate if the designated constraints aren't met.
func (ParseTokenReplyValidationError) Cause ¶
func (e ParseTokenReplyValidationError) Cause() error
Cause function returns cause value.
func (ParseTokenReplyValidationError) Error ¶
func (e ParseTokenReplyValidationError) Error() string
Error satisfies the builtin error interface
func (ParseTokenReplyValidationError) ErrorName ¶
func (e ParseTokenReplyValidationError) ErrorName() string
ErrorName returns error name.
func (ParseTokenReplyValidationError) Field ¶
func (e ParseTokenReplyValidationError) Field() string
Field function returns field value.
func (ParseTokenReplyValidationError) Key ¶
func (e ParseTokenReplyValidationError) Key() bool
Key function returns key value.
func (ParseTokenReplyValidationError) Reason ¶
func (e ParseTokenReplyValidationError) Reason() string
Reason function returns reason value.
type ServiceClient ¶
type ServiceClient interface { Auth(ctx context.Context, in *AuthRequest, opts ...grpc.CallOption) (*AuthReply, error) ParseToken(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*ParseTokenReply, error) }
ServiceClient is the client API for Service 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 NewServiceClient ¶
func NewServiceClient(cc grpc.ClientConnInterface) ServiceClient
type ServiceHTTPClient ¶
type ServiceHTTPClient interface { Auth(ctx context.Context, req *AuthRequest, opts ...http.CallOption) (rsp *AuthReply, err error) ParseToken(ctx context.Context, req *emptypb.Empty, opts ...http.CallOption) (rsp *ParseTokenReply, err error) }
func NewServiceHTTPClient ¶
func NewServiceHTTPClient(client *http.Client) ServiceHTTPClient
type ServiceHTTPClientImpl ¶
type ServiceHTTPClientImpl struct {
// contains filtered or unexported fields
}
func (*ServiceHTTPClientImpl) Auth ¶
func (c *ServiceHTTPClientImpl) Auth(ctx context.Context, in *AuthRequest, opts ...http.CallOption) (*AuthReply, error)
func (*ServiceHTTPClientImpl) ParseToken ¶
func (c *ServiceHTTPClientImpl) ParseToken(ctx context.Context, in *emptypb.Empty, opts ...http.CallOption) (*ParseTokenReply, error)
type ServiceHTTPServer ¶
type ServiceServer ¶
type ServiceServer interface { Auth(context.Context, *AuthRequest) (*AuthReply, error) ParseToken(context.Context, *emptypb.Empty) (*ParseTokenReply, error) // contains filtered or unexported methods }
ServiceServer is the server API for Service service. All implementations must embed UnimplementedServiceServer for forward compatibility
type UnimplementedServiceServer ¶
type UnimplementedServiceServer struct { }
UnimplementedServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedServiceServer) Auth ¶
func (UnimplementedServiceServer) Auth(context.Context, *AuthRequest) (*AuthReply, error)
func (UnimplementedServiceServer) ParseToken ¶
func (UnimplementedServiceServer) ParseToken(context.Context, *emptypb.Empty) (*ParseTokenReply, error)
type UnsafeServiceServer ¶
type UnsafeServiceServer interface {
// contains filtered or unexported methods
}
UnsafeServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ServiceServer will result in compilation errors.