v1

package
v1.0.32 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2024 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Service_Login_FullMethodName        = "/configure_user.Service/Login"
	Service_RefreshToken_FullMethodName = "/configure_user.Service/RefreshToken"
)
View Source
const OperationServiceLogin = "/configure_user.Service/Login"
View Source
const OperationServiceRefreshToken = "/configure_user.Service/RefreshToken"

Variables

View Source
var File_configure_user_proto protoreflect.FileDescriptor
View Source
var File_configure_user_service_proto protoreflect.FileDescriptor
View Source
var Service_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "configure_user.Service",
	HandlerType: (*ServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Login",
			Handler:    _Service_Login_Handler,
		},
		{
			MethodName: "RefreshToken",
			Handler:    _Service_RefreshToken_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "configure_user_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 LoginReply

type LoginReply struct {
	Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
	// contains filtered or unexported fields
}

func (*LoginReply) Descriptor deprecated

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

Deprecated: Use LoginReply.ProtoReflect.Descriptor instead.

func (*LoginReply) GetToken

func (x *LoginReply) GetToken() string

func (*LoginReply) ProtoMessage

func (*LoginReply) ProtoMessage()

func (*LoginReply) ProtoReflect

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

func (*LoginReply) Reset

func (x *LoginReply) Reset()

func (*LoginReply) String

func (x *LoginReply) String() string

func (*LoginReply) Validate

func (m *LoginReply) Validate() error

Validate checks the field values on LoginReply 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 (*LoginReply) ValidateAll

func (m *LoginReply) ValidateAll() error

ValidateAll checks the field values on LoginReply 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 LoginReplyMultiError, or nil if none found.

type LoginReplyMultiError

type LoginReplyMultiError []error

LoginReplyMultiError is an error wrapping multiple validation errors returned by LoginReply.ValidateAll() if the designated constraints aren't met.

func (LoginReplyMultiError) AllErrors

func (m LoginReplyMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (LoginReplyMultiError) Error

func (m LoginReplyMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type LoginReplyValidationError

type LoginReplyValidationError struct {
	// contains filtered or unexported fields
}

LoginReplyValidationError is the validation error returned by LoginReply.Validate if the designated constraints aren't met.

func (LoginReplyValidationError) Cause

func (e LoginReplyValidationError) Cause() error

Cause function returns cause value.

func (LoginReplyValidationError) Error

Error satisfies the builtin error interface

func (LoginReplyValidationError) ErrorName

func (e LoginReplyValidationError) ErrorName() string

ErrorName returns error name.

func (LoginReplyValidationError) Field

Field function returns field value.

func (LoginReplyValidationError) Key

Key function returns key value.

func (LoginReplyValidationError) Reason

func (e LoginReplyValidationError) Reason() string

Reason function returns reason value.

type LoginRequest

type LoginRequest struct {
	Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"`
	Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
	// contains filtered or unexported fields
}

func (*LoginRequest) Descriptor deprecated

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

Deprecated: Use LoginRequest.ProtoReflect.Descriptor instead.

func (*LoginRequest) GetPassword

func (x *LoginRequest) GetPassword() string

func (*LoginRequest) GetUsername

func (x *LoginRequest) GetUsername() string

func (*LoginRequest) ProtoMessage

func (*LoginRequest) ProtoMessage()

func (*LoginRequest) ProtoReflect

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

func (*LoginRequest) Reset

func (x *LoginRequest) Reset()

func (*LoginRequest) String

func (x *LoginRequest) String() string

func (*LoginRequest) Validate

func (m *LoginRequest) Validate() error

Validate checks the field values on LoginRequest 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 (*LoginRequest) ValidateAll

func (m *LoginRequest) ValidateAll() error

ValidateAll checks the field values on LoginRequest 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 LoginRequestMultiError, or nil if none found.

type LoginRequestMultiError

type LoginRequestMultiError []error

LoginRequestMultiError is an error wrapping multiple validation errors returned by LoginRequest.ValidateAll() if the designated constraints aren't met.

func (LoginRequestMultiError) AllErrors

func (m LoginRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (LoginRequestMultiError) Error

func (m LoginRequestMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type LoginRequestValidationError

type LoginRequestValidationError struct {
	// contains filtered or unexported fields
}

LoginRequestValidationError is the validation error returned by LoginRequest.Validate if the designated constraints aren't met.

func (LoginRequestValidationError) Cause

Cause function returns cause value.

func (LoginRequestValidationError) Error

Error satisfies the builtin error interface

func (LoginRequestValidationError) ErrorName

func (e LoginRequestValidationError) ErrorName() string

ErrorName returns error name.

func (LoginRequestValidationError) Field

Field function returns field value.

func (LoginRequestValidationError) Key

Key function returns key value.

func (LoginRequestValidationError) Reason

Reason function returns reason value.

type RefreshTokenReply

type RefreshTokenReply struct {
	Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
	// contains filtered or unexported fields
}

func (*RefreshTokenReply) Descriptor deprecated

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

Deprecated: Use RefreshTokenReply.ProtoReflect.Descriptor instead.

func (*RefreshTokenReply) GetToken

func (x *RefreshTokenReply) GetToken() string

func (*RefreshTokenReply) ProtoMessage

func (*RefreshTokenReply) ProtoMessage()

func (*RefreshTokenReply) ProtoReflect

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

func (*RefreshTokenReply) Reset

func (x *RefreshTokenReply) Reset()

func (*RefreshTokenReply) String

func (x *RefreshTokenReply) String() string

func (*RefreshTokenReply) Validate

func (m *RefreshTokenReply) Validate() error

Validate checks the field values on RefreshTokenReply 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 (*RefreshTokenReply) ValidateAll

func (m *RefreshTokenReply) ValidateAll() error

ValidateAll checks the field values on RefreshTokenReply 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 RefreshTokenReplyMultiError, or nil if none found.

type RefreshTokenReplyMultiError

type RefreshTokenReplyMultiError []error

RefreshTokenReplyMultiError is an error wrapping multiple validation errors returned by RefreshTokenReply.ValidateAll() if the designated constraints aren't met.

func (RefreshTokenReplyMultiError) AllErrors

func (m RefreshTokenReplyMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (RefreshTokenReplyMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type RefreshTokenReplyValidationError

type RefreshTokenReplyValidationError struct {
	// contains filtered or unexported fields
}

RefreshTokenReplyValidationError is the validation error returned by RefreshTokenReply.Validate if the designated constraints aren't met.

func (RefreshTokenReplyValidationError) Cause

Cause function returns cause value.

func (RefreshTokenReplyValidationError) Error

Error satisfies the builtin error interface

func (RefreshTokenReplyValidationError) ErrorName

ErrorName returns error name.

func (RefreshTokenReplyValidationError) Field

Field function returns field value.

func (RefreshTokenReplyValidationError) Key

Key function returns key value.

func (RefreshTokenReplyValidationError) Reason

Reason function returns reason value.

type ServiceClient

type ServiceClient interface {
	// 用户登录
	Login(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*LoginReply, error)
	// RefreshToken 刷新token
	RefreshToken(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*RefreshTokenReply, 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 {
	Login(ctx context.Context, req *LoginRequest, opts ...http.CallOption) (rsp *LoginReply, err error)
	RefreshToken(ctx context.Context, req *emptypb.Empty, opts ...http.CallOption) (rsp *RefreshTokenReply, err error)
}

func NewServiceHTTPClient

func NewServiceHTTPClient(client *http.Client) ServiceHTTPClient

type ServiceHTTPClientImpl

type ServiceHTTPClientImpl struct {
	// contains filtered or unexported fields
}

func (*ServiceHTTPClientImpl) Login

func (*ServiceHTTPClientImpl) RefreshToken

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

type ServiceHTTPServer

type ServiceHTTPServer interface {
	// Login 用户登录
	Login(context.Context, *LoginRequest) (*LoginReply, error)
	// RefreshToken RefreshToken 刷新token
	RefreshToken(context.Context, *emptypb.Empty) (*RefreshTokenReply, error)
}

type ServiceServer

type ServiceServer interface {
	// 用户登录
	Login(context.Context, *LoginRequest) (*LoginReply, error)
	// RefreshToken 刷新token
	RefreshToken(context.Context, *emptypb.Empty) (*RefreshTokenReply, 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) Login

func (UnimplementedServiceServer) RefreshToken

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