Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterAuthHTTPServer(s *http.Server, srv AuthHTTPServer)
- func RegisterAuthServer(s grpc.ServiceRegistrar, srv AuthServer)
- type AuthClient
- type AuthHTTPClient
- type AuthHTTPClientImpl
- type AuthHTTPServer
- type AuthReply
- func (*AuthReply) Descriptor() ([]byte, []int)deprecated
- func (x *AuthReply) GetDepartmentId() uint32
- func (x *AuthReply) GetDepartmentKeyword() string
- func (x *AuthReply) GetRoleId() uint32
- func (x *AuthReply) GetRoleKeyword() string
- func (x *AuthReply) GetUserId() uint32
- 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 AuthRequest
- func (*AuthRequest) Descriptor() ([]byte, []int)deprecated
- 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 AuthServer
- type UnimplementedAuthServer
- type UnsafeAuthServer
Constants ¶
const (
Auth_Auth_FullMethodName = "/manager_auth.Auth/Auth"
)
const OperationAuthAuth = "/manager_auth.Auth/Auth"
Variables ¶
var Auth_ServiceDesc = grpc.ServiceDesc{ ServiceName: "manager_auth.Auth", HandlerType: (*AuthServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Auth", Handler: _Auth_Auth_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "api/manager/auth/manager_auth_service.proto", }
Auth_ServiceDesc is the grpc.ServiceDesc for Auth service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_api_manager_auth_manager_auth_proto protoreflect.FileDescriptor
var File_api_manager_auth_manager_auth_service_proto protoreflect.FileDescriptor
Functions ¶
func RegisterAuthHTTPServer ¶
func RegisterAuthHTTPServer(s *http.Server, srv AuthHTTPServer)
func RegisterAuthServer ¶
func RegisterAuthServer(s grpc.ServiceRegistrar, srv AuthServer)
Types ¶
type AuthClient ¶
type AuthClient interface { // Auth 接口鉴权 Auth(ctx context.Context, in *AuthRequest, opts ...grpc.CallOption) (*AuthReply, error) }
AuthClient is the client API for Auth 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 NewAuthClient ¶
func NewAuthClient(cc grpc.ClientConnInterface) AuthClient
type AuthHTTPClient ¶
type AuthHTTPClient interface {
Auth(ctx context.Context, req *AuthRequest, opts ...http.CallOption) (rsp *AuthReply, err error)
}
func NewAuthHTTPClient ¶
func NewAuthHTTPClient(client *http.Client) AuthHTTPClient
type AuthHTTPClientImpl ¶
type AuthHTTPClientImpl struct {
// contains filtered or unexported fields
}
func (*AuthHTTPClientImpl) Auth ¶
func (c *AuthHTTPClientImpl) Auth(ctx context.Context, in *AuthRequest, opts ...http.CallOption) (*AuthReply, error)
type AuthHTTPServer ¶
type AuthHTTPServer interface { // Auth Auth 接口鉴权 Auth(context.Context, *AuthRequest) (*AuthReply, error) }
type AuthReply ¶
type AuthReply struct { UserId uint32 `protobuf:"varint,1,opt,name=userId,proto3" json:"userId,omitempty"` RoleId uint32 `protobuf:"varint,2,opt,name=roleId,proto3" json:"roleId,omitempty"` RoleKeyword string `protobuf:"bytes,3,opt,name=roleKeyword,proto3" json:"roleKeyword,omitempty"` DepartmentId uint32 `protobuf:"varint,4,opt,name=departmentId,proto3" json:"departmentId,omitempty"` DepartmentKeyword string `protobuf:"bytes,5,opt,name=departmentKeyword,proto3" json:"departmentKeyword,omitempty"` // contains filtered or unexported fields }
func (*AuthReply) Descriptor
deprecated
func (*AuthReply) GetDepartmentId ¶
func (*AuthReply) GetDepartmentKeyword ¶
func (*AuthReply) GetRoleKeyword ¶
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 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"` // contains filtered or unexported fields }
func (*AuthRequest) Descriptor
deprecated
func (*AuthRequest) Descriptor() ([]byte, []int)
Deprecated: Use AuthRequest.ProtoReflect.Descriptor instead.
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 AuthServer ¶
type AuthServer interface { // Auth 接口鉴权 Auth(context.Context, *AuthRequest) (*AuthReply, error) // contains filtered or unexported methods }
AuthServer is the server API for Auth service. All implementations must embed UnimplementedAuthServer for forward compatibility
type UnimplementedAuthServer ¶
type UnimplementedAuthServer struct { }
UnimplementedAuthServer must be embedded to have forward compatible implementations.
func (UnimplementedAuthServer) Auth ¶
func (UnimplementedAuthServer) Auth(context.Context, *AuthRequest) (*AuthReply, error)
type UnsafeAuthServer ¶
type UnsafeAuthServer interface {
// contains filtered or unexported methods
}
UnsafeAuthServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to AuthServer will result in compilation errors.