auth

package
v1.1.8 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_auth_auth_proto protoreflect.FileDescriptor

Functions

func RegisterAuthServer

func RegisterAuthServer(s *grpc.Server, srv AuthServer)

Types

type AuthClient

type AuthClient interface {
	// UMengAutoLogin
	UMengAutoLogin(ctx context.Context, in *UMengAutoLoginReq, opts ...grpc.CallOption) (*UMengAutoLoginResp, error)
	// 生成token
	UserToken(ctx context.Context, in *UserTokenReq, opts ...grpc.CallOption) (*UserTokenResp, error)
	// 强制退出登录
	ForceLogout(ctx context.Context, in *ForceLogoutReq, opts ...grpc.CallOption) (*ForceLogoutResp, error)
	// 解析token
	ParseToken(ctx context.Context, in *ParseTokenReq, opts ...grpc.CallOption) (*ParseTokenResp, error)
}

AuthClient is the client API for Auth service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewAuthClient

func NewAuthClient(cc grpc.ClientConnInterface) AuthClient

type AuthServer

type AuthServer interface {
	// UMengAutoLogin
	UMengAutoLogin(context.Context, *UMengAutoLoginReq) (*UMengAutoLoginResp, error)
	// 生成token
	UserToken(context.Context, *UserTokenReq) (*UserTokenResp, error)
	// 强制退出登录
	ForceLogout(context.Context, *ForceLogoutReq) (*ForceLogoutResp, error)
	// 解析token
	ParseToken(context.Context, *ParseTokenReq) (*ParseTokenResp, error)
}

AuthServer is the server API for Auth service.

type ForceLogoutReq

type ForceLogoutReq struct {
	PlatformID int32  `protobuf:"varint,1,opt,name=platformID,proto3" json:"platformID,omitempty"`
	UserID     string `protobuf:"bytes,2,opt,name=userID,proto3" json:"userID,omitempty"`
	// contains filtered or unexported fields
}

func (*ForceLogoutReq) Check

func (x *ForceLogoutReq) Check() error

func (*ForceLogoutReq) Descriptor deprecated

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

Deprecated: Use ForceLogoutReq.ProtoReflect.Descriptor instead.

func (*ForceLogoutReq) GetPlatformID

func (x *ForceLogoutReq) GetPlatformID() int32

func (*ForceLogoutReq) GetUserID

func (x *ForceLogoutReq) GetUserID() string

func (*ForceLogoutReq) ProtoMessage

func (*ForceLogoutReq) ProtoMessage()

func (*ForceLogoutReq) ProtoReflect

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

func (*ForceLogoutReq) Reset

func (x *ForceLogoutReq) Reset()

func (*ForceLogoutReq) String

func (x *ForceLogoutReq) String() string

type ForceLogoutResp

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

func (*ForceLogoutResp) Descriptor deprecated

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

Deprecated: Use ForceLogoutResp.ProtoReflect.Descriptor instead.

func (*ForceLogoutResp) ProtoMessage

func (*ForceLogoutResp) ProtoMessage()

func (*ForceLogoutResp) ProtoReflect

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

func (*ForceLogoutResp) Reset

func (x *ForceLogoutResp) Reset()

func (*ForceLogoutResp) String

func (x *ForceLogoutResp) String() string

type ParseTokenReq

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

func (*ParseTokenReq) Check

func (x *ParseTokenReq) Check() error

func (*ParseTokenReq) Descriptor deprecated

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

Deprecated: Use ParseTokenReq.ProtoReflect.Descriptor instead.

func (*ParseTokenReq) GetToken

func (x *ParseTokenReq) GetToken() string

func (*ParseTokenReq) ProtoMessage

func (*ParseTokenReq) ProtoMessage()

func (*ParseTokenReq) ProtoReflect

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

func (*ParseTokenReq) Reset

func (x *ParseTokenReq) Reset()

func (*ParseTokenReq) String

func (x *ParseTokenReq) String() string

type ParseTokenResp

type ParseTokenResp struct {
	UserID            string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID,omitempty"`
	Platform          string `protobuf:"bytes,2,opt,name=platform,proto3" json:"platform,omitempty"`
	ExpireTimeSeconds int64  `protobuf:"varint,4,opt,name=expireTimeSeconds,proto3" json:"expireTimeSeconds,omitempty"`
	// contains filtered or unexported fields
}

func (*ParseTokenResp) Descriptor deprecated

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

Deprecated: Use ParseTokenResp.ProtoReflect.Descriptor instead.

func (*ParseTokenResp) GetExpireTimeSeconds

func (x *ParseTokenResp) GetExpireTimeSeconds() int64

func (*ParseTokenResp) GetPlatform

func (x *ParseTokenResp) GetPlatform() string

func (*ParseTokenResp) GetUserID

func (x *ParseTokenResp) GetUserID() string

func (*ParseTokenResp) ProtoMessage

func (*ParseTokenResp) ProtoMessage()

func (*ParseTokenResp) ProtoReflect

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

func (*ParseTokenResp) Reset

func (x *ParseTokenResp) Reset()

func (*ParseTokenResp) String

func (x *ParseTokenResp) String() string

type UMengAutoLoginReq added in v0.0.81

type UMengAutoLoginReq struct {
	Secret     string `protobuf:"bytes,1,opt,name=secret,proto3" json:"secret,omitempty"`
	PlatformID int32  `protobuf:"varint,2,opt,name=platformID,proto3" json:"platformID,omitempty"`
	Token      string `protobuf:"bytes,3,opt,name=token,proto3" json:"token,omitempty"`
	// contains filtered or unexported fields
}

func (*UMengAutoLoginReq) Descriptor deprecated added in v0.0.81

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

Deprecated: Use UMengAutoLoginReq.ProtoReflect.Descriptor instead.

func (*UMengAutoLoginReq) GetPlatformID added in v0.0.81

func (x *UMengAutoLoginReq) GetPlatformID() int32

func (*UMengAutoLoginReq) GetSecret added in v0.0.81

func (x *UMengAutoLoginReq) GetSecret() string

func (*UMengAutoLoginReq) GetToken added in v0.0.81

func (x *UMengAutoLoginReq) GetToken() string

func (*UMengAutoLoginReq) ProtoMessage added in v0.0.81

func (*UMengAutoLoginReq) ProtoMessage()

func (*UMengAutoLoginReq) ProtoReflect added in v0.0.81

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

func (*UMengAutoLoginReq) Reset added in v0.0.81

func (x *UMengAutoLoginReq) Reset()

func (*UMengAutoLoginReq) String added in v0.0.81

func (x *UMengAutoLoginReq) String() string

type UMengAutoLoginResp added in v0.0.81

type UMengAutoLoginResp struct {
	Token             string `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"`
	ExpireTimeSeconds int64  `protobuf:"varint,3,opt,name=expireTimeSeconds,proto3" json:"expireTimeSeconds,omitempty"`
	// contains filtered or unexported fields
}

func (*UMengAutoLoginResp) Descriptor deprecated added in v0.0.81

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

Deprecated: Use UMengAutoLoginResp.ProtoReflect.Descriptor instead.

func (*UMengAutoLoginResp) GetExpireTimeSeconds added in v0.0.81

func (x *UMengAutoLoginResp) GetExpireTimeSeconds() int64

func (*UMengAutoLoginResp) GetToken added in v0.0.81

func (x *UMengAutoLoginResp) GetToken() string

func (*UMengAutoLoginResp) ProtoMessage added in v0.0.81

func (*UMengAutoLoginResp) ProtoMessage()

func (*UMengAutoLoginResp) ProtoReflect added in v0.0.81

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

func (*UMengAutoLoginResp) Reset added in v0.0.81

func (x *UMengAutoLoginResp) Reset()

func (*UMengAutoLoginResp) String added in v0.0.81

func (x *UMengAutoLoginResp) String() string

type UnimplementedAuthServer

type UnimplementedAuthServer struct {
}

UnimplementedAuthServer can be embedded to have forward compatible implementations.

func (*UnimplementedAuthServer) ForceLogout

func (*UnimplementedAuthServer) ParseToken

func (*UnimplementedAuthServer) UMengAutoLogin added in v1.1.6

func (*UnimplementedAuthServer) UserToken

type UserTokenReq

type UserTokenReq struct {
	Secret     string `protobuf:"bytes,1,opt,name=secret,proto3" json:"secret,omitempty"`
	PlatformID int32  `protobuf:"varint,2,opt,name=platformID,proto3" json:"platformID,omitempty"`
	UserID     string `protobuf:"bytes,3,opt,name=userID,proto3" json:"userID,omitempty"`
	// contains filtered or unexported fields
}

func (*UserTokenReq) Check

func (x *UserTokenReq) Check() error

func (*UserTokenReq) Descriptor deprecated

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

Deprecated: Use UserTokenReq.ProtoReflect.Descriptor instead.

func (*UserTokenReq) GetPlatformID

func (x *UserTokenReq) GetPlatformID() int32

func (*UserTokenReq) GetSecret

func (x *UserTokenReq) GetSecret() string

func (*UserTokenReq) GetUserID

func (x *UserTokenReq) GetUserID() string

func (*UserTokenReq) ProtoMessage

func (*UserTokenReq) ProtoMessage()

func (*UserTokenReq) ProtoReflect

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

func (*UserTokenReq) Reset

func (x *UserTokenReq) Reset()

func (*UserTokenReq) String

func (x *UserTokenReq) String() string

type UserTokenResp

type UserTokenResp struct {
	Token             string `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"`
	ExpireTimeSeconds int64  `protobuf:"varint,3,opt,name=expireTimeSeconds,proto3" json:"expireTimeSeconds,omitempty"`
	// contains filtered or unexported fields
}

func (*UserTokenResp) Descriptor deprecated

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

Deprecated: Use UserTokenResp.ProtoReflect.Descriptor instead.

func (*UserTokenResp) GetExpireTimeSeconds

func (x *UserTokenResp) GetExpireTimeSeconds() int64

func (*UserTokenResp) GetToken

func (x *UserTokenResp) GetToken() string

func (*UserTokenResp) ProtoMessage

func (*UserTokenResp) ProtoMessage()

func (*UserTokenResp) ProtoReflect

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

func (*UserTokenResp) Reset

func (x *UserTokenResp) Reset()

func (*UserTokenResp) String

func (x *UserTokenResp) String() string

Jump to

Keyboard shortcuts

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