auth

package
v0.0.15 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	Auth_Login_FullMethodName        = "/api.server.auth.Auth/Login"
	Auth_Logout_FullMethodName       = "/api.server.auth.Auth/Logout"
	Auth_RefreshToken_FullMethodName = "/api.server.auth.Auth/RefreshToken"
	Auth_Captcha_FullMethodName      = "/api.server.auth.Auth/Captcha"
)
View Source
const OperationAuthCaptcha = "/api.server.auth.Auth/Captcha"
View Source
const OperationAuthLogin = "/api.server.auth.Auth/Login"
View Source
const OperationAuthLogout = "/api.server.auth.Auth/Logout"
View Source
const OperationAuthRefreshToken = "/api.server.auth.Auth/RefreshToken"

Variables

View Source
var Auth_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "api.server.auth.Auth",
	HandlerType: (*AuthServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Login",
			Handler:    _Auth_Login_Handler,
		},
		{
			MethodName: "Logout",
			Handler:    _Auth_Logout_Handler,
		},
		{
			MethodName: "RefreshToken",
			Handler:    _Auth_RefreshToken_Handler,
		},
		{
			MethodName: "Captcha",
			Handler:    _Auth_Captcha_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "server/auth/auth.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_server_auth_auth_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 {
	// 登录(目前是通过用户名+密码方式)
	Login(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*LoginReply, error)
	// 登出, 清除token
	Logout(ctx context.Context, in *LogoutRequest, opts ...grpc.CallOption) (*LogoutReply, error)
	// 刷新token, 过期时间为1天, 切换角色也是用该接口
	RefreshToken(ctx context.Context, in *RefreshTokenRequest, opts ...grpc.CallOption) (*RefreshTokenReply, error)
	// 获取验证码, 验证码有几种类型, 具体见CaptchaType
	Captcha(ctx context.Context, in *CaptchaRequest, opts ...grpc.CallOption) (*CaptchaReply, 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 {
	Captcha(ctx context.Context, req *CaptchaRequest, opts ...http.CallOption) (rsp *CaptchaReply, err error)
	Login(ctx context.Context, req *LoginRequest, opts ...http.CallOption) (rsp *LoginReply, err error)
	Logout(ctx context.Context, req *LogoutRequest, opts ...http.CallOption) (rsp *LogoutReply, err error)
	RefreshToken(ctx context.Context, req *RefreshTokenRequest, opts ...http.CallOption) (rsp *RefreshTokenReply, err error)
}

func NewAuthHTTPClient

func NewAuthHTTPClient(client *http.Client) AuthHTTPClient

type AuthHTTPClientImpl

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

func (*AuthHTTPClientImpl) Captcha

func (*AuthHTTPClientImpl) Login

func (*AuthHTTPClientImpl) Logout

func (*AuthHTTPClientImpl) RefreshToken

type AuthServer

type AuthServer interface {
	// 登录(目前是通过用户名+密码方式)
	Login(context.Context, *LoginRequest) (*LoginReply, error)
	// 登出, 清除token
	Logout(context.Context, *LogoutRequest) (*LogoutReply, error)
	// 刷新token, 过期时间为1天, 切换角色也是用该接口
	RefreshToken(context.Context, *RefreshTokenRequest) (*RefreshTokenReply, error)
	// 获取验证码, 验证码有几种类型, 具体见CaptchaType
	Captcha(context.Context, *CaptchaRequest) (*CaptchaReply, error)
	// contains filtered or unexported methods
}

AuthServer is the server API for Auth service. All implementations must embed UnimplementedAuthServer for forward compatibility

type CaptchaReply

type CaptchaReply struct {

	// 验证码base64信息, 如果是图片验证码, 则直接使用img标签展示即可, 如果是音频验证码, 则需要调用相关接口播放音频
	Captcha string `protobuf:"bytes,1,opt,name=captcha,proto3" json:"captcha,omitempty"`
	// 验证码标识ID, 验证的时候需要传递该值
	CaptchaId string `protobuf:"bytes,2,opt,name=captchaId,proto3" json:"captchaId,omitempty"`
	// contains filtered or unexported fields
}

获取验证码返回参数

func (*CaptchaReply) Descriptor deprecated

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

Deprecated: Use CaptchaReply.ProtoReflect.Descriptor instead.

func (*CaptchaReply) GetCaptcha

func (x *CaptchaReply) GetCaptcha() string

func (*CaptchaReply) GetCaptchaId

func (x *CaptchaReply) GetCaptchaId() string

func (*CaptchaReply) ProtoMessage

func (*CaptchaReply) ProtoMessage()

func (*CaptchaReply) ProtoReflect

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

func (*CaptchaReply) Reset

func (x *CaptchaReply) Reset()

func (*CaptchaReply) String

func (x *CaptchaReply) String() string

func (*CaptchaReply) Validate

func (m *CaptchaReply) Validate() error

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

func (m *CaptchaReply) ValidateAll() error

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

type CaptchaReplyMultiError

type CaptchaReplyMultiError []error

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

func (CaptchaReplyMultiError) AllErrors

func (m CaptchaReplyMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (CaptchaReplyMultiError) Error

func (m CaptchaReplyMultiError) Error() string

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

type CaptchaReplyValidationError

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

CaptchaReplyValidationError is the validation error returned by CaptchaReply.Validate if the designated constraints aren't met.

func (CaptchaReplyValidationError) Cause

Cause function returns cause value.

func (CaptchaReplyValidationError) Error

Error satisfies the builtin error interface

func (CaptchaReplyValidationError) ErrorName

func (e CaptchaReplyValidationError) ErrorName() string

ErrorName returns error name.

func (CaptchaReplyValidationError) Field

Field function returns field value.

func (CaptchaReplyValidationError) Key

Key function returns key value.

func (CaptchaReplyValidationError) Reason

Reason function returns reason value.

type CaptchaRequest

type CaptchaRequest struct {

	// 验证码宽度
	X uint64 `protobuf:"varint,1,opt,name=x,proto3" json:"x,omitempty"`
	// 验证码高度
	Y uint64 `protobuf:"varint,2,opt,name=y,proto3" json:"y,omitempty"`
	// 验证码类型
	CaptchaType api.CaptchaType `protobuf:"varint,3,opt,name=captcha_type,json=captchaType,proto3,enum=api.CaptchaType" json:"captcha_type,omitempty"`
	// 主题
	Theme string `protobuf:"bytes,4,opt,name=theme,proto3" json:"theme,omitempty"`
	// contains filtered or unexported fields
}

获取验证码请求参数

func (*CaptchaRequest) Descriptor deprecated

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

Deprecated: Use CaptchaRequest.ProtoReflect.Descriptor instead.

func (*CaptchaRequest) GetCaptchaType

func (x *CaptchaRequest) GetCaptchaType() api.CaptchaType

func (*CaptchaRequest) GetTheme

func (x *CaptchaRequest) GetTheme() string

func (*CaptchaRequest) GetX

func (x *CaptchaRequest) GetX() uint64

func (*CaptchaRequest) GetY

func (x *CaptchaRequest) GetY() uint64

func (*CaptchaRequest) ProtoMessage

func (*CaptchaRequest) ProtoMessage()

func (*CaptchaRequest) ProtoReflect

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

func (*CaptchaRequest) Reset

func (x *CaptchaRequest) Reset()

func (*CaptchaRequest) String

func (x *CaptchaRequest) String() string

func (*CaptchaRequest) Validate

func (m *CaptchaRequest) Validate() error

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

func (m *CaptchaRequest) ValidateAll() error

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

type CaptchaRequestMultiError

type CaptchaRequestMultiError []error

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

func (CaptchaRequestMultiError) AllErrors

func (m CaptchaRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (CaptchaRequestMultiError) Error

func (m CaptchaRequestMultiError) Error() string

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

type CaptchaRequestValidationError

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

CaptchaRequestValidationError is the validation error returned by CaptchaRequest.Validate if the designated constraints aren't met.

func (CaptchaRequestValidationError) Cause

Cause function returns cause value.

func (CaptchaRequestValidationError) Error

Error satisfies the builtin error interface

func (CaptchaRequestValidationError) ErrorName

func (e CaptchaRequestValidationError) ErrorName() string

ErrorName returns error name.

func (CaptchaRequestValidationError) Field

Field function returns field value.

func (CaptchaRequestValidationError) Key

Key function returns key value.

func (CaptchaRequestValidationError) Reason

Reason function returns reason value.

type LoginReply

type LoginReply struct {

	// 登录token
	Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
	// 用户详情
	User *api.UserV1 `protobuf:"bytes,2,opt,name=user,proto3" json:"user,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) GetUser

func (x *LoginReply) GetUser() *api.UserV1

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"`
	// 验证码
	Code string `protobuf:"bytes,3,opt,name=code,proto3" json:"code,omitempty"`
	// 验证码id
	CaptchaId string `protobuf:"bytes,4,opt,name=captchaId,proto3" json:"captchaId,omitempty"`
	// contains filtered or unexported fields
}

登录请求参数

func (*LoginRequest) Descriptor deprecated

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

Deprecated: Use LoginRequest.ProtoReflect.Descriptor instead.

func (*LoginRequest) GetCaptchaId

func (x *LoginRequest) GetCaptchaId() string

func (*LoginRequest) GetCode

func (x *LoginRequest) GetCode() string

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 LogoutReply

type LogoutReply struct {

	// 响应信息, 如果成功, 则返回userId
	UserId uint32 `protobuf:"varint,1,opt,name=userId,proto3" json:"userId,omitempty"`
	// contains filtered or unexported fields
}

登出返回参数

func (*LogoutReply) Descriptor deprecated

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

Deprecated: Use LogoutReply.ProtoReflect.Descriptor instead.

func (*LogoutReply) GetUserId

func (x *LogoutReply) GetUserId() uint32

func (*LogoutReply) ProtoMessage

func (*LogoutReply) ProtoMessage()

func (*LogoutReply) ProtoReflect

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

func (*LogoutReply) Reset

func (x *LogoutReply) Reset()

func (*LogoutReply) String

func (x *LogoutReply) String() string

func (*LogoutReply) Validate

func (m *LogoutReply) Validate() error

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

func (m *LogoutReply) ValidateAll() error

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

type LogoutReplyMultiError

type LogoutReplyMultiError []error

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

func (LogoutReplyMultiError) AllErrors

func (m LogoutReplyMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (LogoutReplyMultiError) Error

func (m LogoutReplyMultiError) Error() string

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

type LogoutReplyValidationError

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

LogoutReplyValidationError is the validation error returned by LogoutReply.Validate if the designated constraints aren't met.

func (LogoutReplyValidationError) Cause

Cause function returns cause value.

func (LogoutReplyValidationError) Error

Error satisfies the builtin error interface

func (LogoutReplyValidationError) ErrorName

func (e LogoutReplyValidationError) ErrorName() string

ErrorName returns error name.

func (LogoutReplyValidationError) Field

Field function returns field value.

func (LogoutReplyValidationError) Key

Key function returns key value.

func (LogoutReplyValidationError) Reason

Reason function returns reason value.

type LogoutRequest

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

登出请求参数(登出不需要参数, 这里只是为了站位)

func (*LogoutRequest) Descriptor deprecated

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

Deprecated: Use LogoutRequest.ProtoReflect.Descriptor instead.

func (*LogoutRequest) ProtoMessage

func (*LogoutRequest) ProtoMessage()

func (*LogoutRequest) ProtoReflect

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

func (*LogoutRequest) Reset

func (x *LogoutRequest) Reset()

func (*LogoutRequest) String

func (x *LogoutRequest) String() string

func (*LogoutRequest) Validate

func (m *LogoutRequest) Validate() error

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

func (m *LogoutRequest) ValidateAll() error

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

type LogoutRequestMultiError

type LogoutRequestMultiError []error

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

func (LogoutRequestMultiError) AllErrors

func (m LogoutRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (LogoutRequestMultiError) Error

func (m LogoutRequestMultiError) Error() string

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

type LogoutRequestValidationError

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

LogoutRequestValidationError is the validation error returned by LogoutRequest.Validate if the designated constraints aren't met.

func (LogoutRequestValidationError) Cause

Cause function returns cause value.

func (LogoutRequestValidationError) Error

Error satisfies the builtin error interface

func (LogoutRequestValidationError) ErrorName

func (e LogoutRequestValidationError) ErrorName() string

ErrorName returns error name.

func (LogoutRequestValidationError) Field

Field function returns field value.

func (LogoutRequestValidationError) Key

Key function returns key value.

func (LogoutRequestValidationError) Reason

Reason function returns reason value.

type RefreshTokenReply

type RefreshTokenReply struct {

	// JWT token, 需要在header中传递
	Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
	// 用户详情
	User *api.UserV1 `protobuf:"bytes,2,opt,name=user,proto3" json:"user,omitempty"`
	// contains filtered or unexported fields
}

刷新token返回参数

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

func (x *RefreshTokenReply) GetUser() *api.UserV1

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 RefreshTokenRequest

type RefreshTokenRequest struct {

	// 角色id, 不传则刷新当前token的角色, 相关角色可以通过查看用户详情接口得到该用户的角色列表信息
	RoleId uint32 `protobuf:"varint,1,opt,name=roleId,proto3" json:"roleId,omitempty"`
	// contains filtered or unexported fields
}

刷新token请求参数

func (*RefreshTokenRequest) Descriptor deprecated

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

Deprecated: Use RefreshTokenRequest.ProtoReflect.Descriptor instead.

func (*RefreshTokenRequest) GetRoleId

func (x *RefreshTokenRequest) GetRoleId() uint32

func (*RefreshTokenRequest) ProtoMessage

func (*RefreshTokenRequest) ProtoMessage()

func (*RefreshTokenRequest) ProtoReflect

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

func (*RefreshTokenRequest) Reset

func (x *RefreshTokenRequest) Reset()

func (*RefreshTokenRequest) String

func (x *RefreshTokenRequest) String() string

func (*RefreshTokenRequest) Validate

func (m *RefreshTokenRequest) Validate() error

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

func (m *RefreshTokenRequest) ValidateAll() error

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

type RefreshTokenRequestMultiError

type RefreshTokenRequestMultiError []error

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

func (RefreshTokenRequestMultiError) AllErrors

func (m RefreshTokenRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (RefreshTokenRequestMultiError) Error

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

type RefreshTokenRequestValidationError

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

RefreshTokenRequestValidationError is the validation error returned by RefreshTokenRequest.Validate if the designated constraints aren't met.

func (RefreshTokenRequestValidationError) Cause

Cause function returns cause value.

func (RefreshTokenRequestValidationError) Error

Error satisfies the builtin error interface

func (RefreshTokenRequestValidationError) ErrorName

ErrorName returns error name.

func (RefreshTokenRequestValidationError) Field

Field function returns field value.

func (RefreshTokenRequestValidationError) Key

Key function returns key value.

func (RefreshTokenRequestValidationError) Reason

Reason function returns reason value.

type UnimplementedAuthServer

type UnimplementedAuthServer struct {
}

UnimplementedAuthServer must be embedded to have forward compatible implementations.

func (UnimplementedAuthServer) Captcha

func (UnimplementedAuthServer) Login

func (UnimplementedAuthServer) Logout

func (UnimplementedAuthServer) RefreshToken

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