v1

package
v1.0.16 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 27, 2024 License: MIT Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Auth_Auth_FullMethodName = "/manager_auth.Auth/Auth"
)
View Source
const OperationAuthAuth = "/manager_auth.Auth/Auth"

Variables

View Source
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)

View Source
var File_api_manager_auth_manager_auth_proto protoreflect.FileDescriptor
View Source
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

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) Descriptor() ([]byte, []int)

Deprecated: Use AuthReply.ProtoReflect.Descriptor instead.

func (*AuthReply) GetDepartmentId

func (x *AuthReply) GetDepartmentId() uint32

func (*AuthReply) GetDepartmentKeyword

func (x *AuthReply) GetDepartmentKeyword() string

func (*AuthReply) GetRoleId

func (x *AuthReply) GetRoleId() uint32

func (*AuthReply) GetRoleKeyword

func (x *AuthReply) GetRoleKeyword() string

func (*AuthReply) GetUserId

func (x *AuthReply) GetUserId() uint32

func (*AuthReply) ProtoMessage

func (*AuthReply) ProtoMessage()

func (*AuthReply) ProtoReflect

func (x *AuthReply) ProtoReflect() protoreflect.Message

func (*AuthReply) Reset

func (x *AuthReply) Reset()

func (*AuthReply) String

func (x *AuthReply) String() string

func (*AuthReply) Validate

func (m *AuthReply) Validate() error

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

func (m *AuthReply) ValidateAll() error

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

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

Cause function returns cause value.

func (AuthRequestValidationError) Error

Error satisfies the builtin error interface

func (AuthRequestValidationError) ErrorName

func (e AuthRequestValidationError) ErrorName() string

ErrorName returns error name.

func (AuthRequestValidationError) Field

Field function returns field value.

func (AuthRequestValidationError) Key

Key function returns key value.

func (AuthRequestValidationError) Reason

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

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL