v1

package
v1.0.13 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: MIT Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Service_Auth_FullMethodName       = "/manager_auth.Service/Auth"
	Service_ParseToken_FullMethodName = "/manager_auth.Service/ParseToken"
)
View Source
const OperationServiceAuth = "/manager_auth.Service/Auth"
View Source
const OperationServiceParseToken = "/manager_auth.Service/ParseToken"

Variables

View Source
var File_manager_auth_proto protoreflect.FileDescriptor
View Source
var File_manager_auth_service_proto protoreflect.FileDescriptor
View Source
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 {
	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"`
	RoleKeyword       string                      `protobuf:"bytes,3,opt,name=role_keyword,json=roleKeyword,proto3" json:"role_keyword,omitempty"`
	DepartmentId      uint32                      `protobuf:"varint,4,opt,name=department_id,json=departmentId,proto3" json:"department_id,omitempty"`
	DepartmentKeyword string                      `protobuf:"bytes,5,opt,name=department_keyword,json=departmentKeyword,proto3" json:"department_keyword,omitempty"`
	Scope             map[string]*AuthReply_Scope `` /* 151-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*AuthReply) Descriptor deprecated

func (*AuthReply) Descriptor() ([]byte, []int)

Deprecated: Use AuthReply.ProtoReflect.Descriptor instead.

func (*AuthReply) GetDepartmentId added in v1.0.12

func (x *AuthReply) GetDepartmentId() uint32

func (*AuthReply) GetDepartmentKeyword added in v1.0.12

func (x *AuthReply) GetDepartmentKeyword() string

func (*AuthReply) GetRoleId added in v1.0.12

func (x *AuthReply) GetRoleId() uint32

func (*AuthReply) GetRoleKeyword added in v1.0.12

func (x *AuthReply) GetRoleKeyword() string

func (*AuthReply) GetScope

func (x *AuthReply) GetScope() map[string]*AuthReply_Scope

func (*AuthReply) GetUserId added in v1.0.12

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 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

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

Cause function returns cause value.

func (AuthReply_ScopeValidationError) Error

Error satisfies the builtin error interface

func (AuthReply_ScopeValidationError) ErrorName

func (e AuthReply_ScopeValidationError) ErrorName() string

ErrorName returns error name.

func (AuthReply_ScopeValidationError) Field

Field function returns field value.

func (AuthReply_ScopeValidationError) Key

Key function returns key value.

func (AuthReply_ScopeValidationError) Reason

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

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 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

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

Cause function returns cause value.

func (ParseTokenReplyValidationError) Error

Error satisfies the builtin error interface

func (ParseTokenReplyValidationError) ErrorName

func (e ParseTokenReplyValidationError) ErrorName() string

ErrorName returns error name.

func (ParseTokenReplyValidationError) Field

Field function returns field value.

func (ParseTokenReplyValidationError) Key

Key function returns key value.

func (ParseTokenReplyValidationError) Reason

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 (*ServiceHTTPClientImpl) ParseToken

func (c *ServiceHTTPClientImpl) ParseToken(ctx context.Context, in *emptypb.Empty, opts ...http.CallOption) (*ParseTokenReply, error)

type ServiceHTTPServer

type ServiceHTTPServer interface {
	Auth(context.Context, *AuthRequest) (*AuthReply, error)
	ParseToken(context.Context, *emptypb.Empty) (*ParseTokenReply, error)
}

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) ParseToken

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.

Jump to

Keyboard shortcuts

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