Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterRefreshTokenServer(s grpc.ServiceRegistrar, srv RefreshTokenServer)
- type AccessToken
- func (*AccessToken) Descriptor() ([]byte, []int)deprecated
- func (x *AccessToken) GetAccessToken() string
- func (x *AccessToken) GetPayload() string
- func (*AccessToken) ProtoMessage()
- func (x *AccessToken) ProtoReflect() protoreflect.Message
- func (x *AccessToken) Reset()
- func (x *AccessToken) String() string
- type AccessTokenInfo
- func (*AccessTokenInfo) Descriptor() ([]byte, []int)deprecated
- func (x *AccessTokenInfo) GetPayload() string
- func (x *AccessTokenInfo) GetUid() uint64
- func (*AccessTokenInfo) ProtoMessage()
- func (x *AccessTokenInfo) ProtoReflect() protoreflect.Message
- func (x *AccessTokenInfo) Reset()
- func (x *AccessTokenInfo) String() string
- type RefreshTokenClient
- type RefreshTokenServer
- type TokenRequest
- func (*TokenRequest) Descriptor() ([]byte, []int)deprecated
- func (x *TokenRequest) GetAppCode() string
- func (x *TokenRequest) GetSignature() string
- func (x *TokenRequest) GetToken() string
- func (*TokenRequest) ProtoMessage()
- func (x *TokenRequest) ProtoReflect() protoreflect.Message
- func (x *TokenRequest) Reset()
- func (x *TokenRequest) String() string
- type UnimplementedRefreshTokenServer
- func (UnimplementedRefreshTokenServer) DestroyRefreshToken(context.Context, *TokenRequest) (*emptypb.Empty, error)
- func (UnimplementedRefreshTokenServer) GetUserInfo(context.Context, *TokenRequest) (*UserInfo, error)
- func (UnimplementedRefreshTokenServer) RefreshToken(context.Context, *TokenRequest) (*AccessToken, error)
- func (UnimplementedRefreshTokenServer) VerifyAccessToken(context.Context, *TokenRequest) (*AccessTokenInfo, error)
- type UnsafeRefreshTokenServer
- type UserInfo
- func (*UserInfo) Descriptor() ([]byte, []int)deprecated
- func (x *UserInfo) GetAvatarUrl() string
- func (x *UserInfo) GetGroups() []string
- func (x *UserInfo) GetName() string
- func (x *UserInfo) GetUid() uint64
- func (*UserInfo) ProtoMessage()
- func (x *UserInfo) ProtoReflect() protoreflect.Message
- func (x *UserInfo) Reset()
- func (x *UserInfo) String() string
Constants ¶
const ( RefreshToken_RefreshToken_FullMethodName = "/refreshTokenProto.RefreshToken/RefreshToken" RefreshToken_DestroyRefreshToken_FullMethodName = "/refreshTokenProto.RefreshToken/DestroyRefreshToken" RefreshToken_VerifyAccessToken_FullMethodName = "/refreshTokenProto.RefreshToken/VerifyAccessToken" RefreshToken_GetUserInfo_FullMethodName = "/refreshTokenProto.RefreshToken/GetUserInfo" )
Variables ¶
var File_protos_refreshToken_proto protoreflect.FileDescriptor
var RefreshToken_ServiceDesc = grpc.ServiceDesc{ ServiceName: "refreshTokenProto.RefreshToken", HandlerType: (*RefreshTokenServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "RefreshToken", Handler: _RefreshToken_RefreshToken_Handler, }, { MethodName: "DestroyRefreshToken", Handler: _RefreshToken_DestroyRefreshToken_Handler, }, { MethodName: "VerifyAccessToken", Handler: _RefreshToken_VerifyAccessToken_Handler, }, { MethodName: "GetUserInfo", Handler: _RefreshToken_GetUserInfo_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "protos/refreshToken.proto", }
RefreshToken_ServiceDesc is the grpc.ServiceDesc for RefreshToken service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterRefreshTokenServer ¶
func RegisterRefreshTokenServer(s grpc.ServiceRegistrar, srv RefreshTokenServer)
Types ¶
type AccessToken ¶
type AccessToken struct { AccessToken string `protobuf:"bytes,1,opt,name=access_token,json=accessToken,proto3" json:"access_token,omitempty"` Payload string `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"` // contains filtered or unexported fields }
func (*AccessToken) Descriptor
deprecated
func (*AccessToken) Descriptor() ([]byte, []int)
Deprecated: Use AccessToken.ProtoReflect.Descriptor instead.
func (*AccessToken) GetAccessToken ¶
func (x *AccessToken) GetAccessToken() string
func (*AccessToken) GetPayload ¶
func (x *AccessToken) GetPayload() string
func (*AccessToken) ProtoMessage ¶
func (*AccessToken) ProtoMessage()
func (*AccessToken) ProtoReflect ¶
func (x *AccessToken) ProtoReflect() protoreflect.Message
func (*AccessToken) Reset ¶
func (x *AccessToken) Reset()
func (*AccessToken) String ¶
func (x *AccessToken) String() string
type AccessTokenInfo ¶
type AccessTokenInfo struct { Uid uint64 `protobuf:"varint,1,opt,name=uid,proto3" json:"uid,omitempty"` Payload string `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"` // contains filtered or unexported fields }
func (*AccessTokenInfo) Descriptor
deprecated
func (*AccessTokenInfo) Descriptor() ([]byte, []int)
Deprecated: Use AccessTokenInfo.ProtoReflect.Descriptor instead.
func (*AccessTokenInfo) GetPayload ¶
func (x *AccessTokenInfo) GetPayload() string
func (*AccessTokenInfo) GetUid ¶
func (x *AccessTokenInfo) GetUid() uint64
func (*AccessTokenInfo) ProtoMessage ¶
func (*AccessTokenInfo) ProtoMessage()
func (*AccessTokenInfo) ProtoReflect ¶
func (x *AccessTokenInfo) ProtoReflect() protoreflect.Message
func (*AccessTokenInfo) Reset ¶
func (x *AccessTokenInfo) Reset()
func (*AccessTokenInfo) String ¶
func (x *AccessTokenInfo) String() string
type RefreshTokenClient ¶
type RefreshTokenClient interface { RefreshToken(ctx context.Context, in *TokenRequest, opts ...grpc.CallOption) (*AccessToken, error) DestroyRefreshToken(ctx context.Context, in *TokenRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) VerifyAccessToken(ctx context.Context, in *TokenRequest, opts ...grpc.CallOption) (*AccessTokenInfo, error) GetUserInfo(ctx context.Context, in *TokenRequest, opts ...grpc.CallOption) (*UserInfo, error) }
RefreshTokenClient is the client API for RefreshToken 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 NewRefreshTokenClient ¶
func NewRefreshTokenClient(cc grpc.ClientConnInterface) RefreshTokenClient
type RefreshTokenServer ¶
type RefreshTokenServer interface { RefreshToken(context.Context, *TokenRequest) (*AccessToken, error) DestroyRefreshToken(context.Context, *TokenRequest) (*emptypb.Empty, error) VerifyAccessToken(context.Context, *TokenRequest) (*AccessTokenInfo, error) GetUserInfo(context.Context, *TokenRequest) (*UserInfo, error) // contains filtered or unexported methods }
RefreshTokenServer is the server API for RefreshToken service. All implementations must embed UnimplementedRefreshTokenServer for forward compatibility
type TokenRequest ¶
type TokenRequest struct { AppCode string `protobuf:"bytes,1,opt,name=app_code,json=appCode,proto3" json:"app_code,omitempty"` Signature string `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` Token string `protobuf:"bytes,3,opt,name=token,proto3" json:"token,omitempty"` // contains filtered or unexported fields }
func (*TokenRequest) Descriptor
deprecated
func (*TokenRequest) Descriptor() ([]byte, []int)
Deprecated: Use TokenRequest.ProtoReflect.Descriptor instead.
func (*TokenRequest) GetAppCode ¶
func (x *TokenRequest) GetAppCode() string
func (*TokenRequest) GetSignature ¶
func (x *TokenRequest) GetSignature() string
func (*TokenRequest) GetToken ¶
func (x *TokenRequest) GetToken() string
func (*TokenRequest) ProtoMessage ¶
func (*TokenRequest) ProtoMessage()
func (*TokenRequest) ProtoReflect ¶
func (x *TokenRequest) ProtoReflect() protoreflect.Message
func (*TokenRequest) Reset ¶
func (x *TokenRequest) Reset()
func (*TokenRequest) String ¶
func (x *TokenRequest) String() string
type UnimplementedRefreshTokenServer ¶
type UnimplementedRefreshTokenServer struct { }
UnimplementedRefreshTokenServer must be embedded to have forward compatible implementations.
func (UnimplementedRefreshTokenServer) DestroyRefreshToken ¶
func (UnimplementedRefreshTokenServer) DestroyRefreshToken(context.Context, *TokenRequest) (*emptypb.Empty, error)
func (UnimplementedRefreshTokenServer) GetUserInfo ¶
func (UnimplementedRefreshTokenServer) GetUserInfo(context.Context, *TokenRequest) (*UserInfo, error)
func (UnimplementedRefreshTokenServer) RefreshToken ¶
func (UnimplementedRefreshTokenServer) RefreshToken(context.Context, *TokenRequest) (*AccessToken, error)
func (UnimplementedRefreshTokenServer) VerifyAccessToken ¶
func (UnimplementedRefreshTokenServer) VerifyAccessToken(context.Context, *TokenRequest) (*AccessTokenInfo, error)
type UnsafeRefreshTokenServer ¶
type UnsafeRefreshTokenServer interface {
// contains filtered or unexported methods
}
UnsafeRefreshTokenServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to RefreshTokenServer will result in compilation errors.
type UserInfo ¶
type UserInfo struct { Uid uint64 `protobuf:"varint,1,opt,name=uid,proto3" json:"uid,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` AvatarUrl string `protobuf:"bytes,3,opt,name=avatar_url,json=avatarUrl,proto3" json:"avatar_url,omitempty"` Groups []string `protobuf:"bytes,4,rep,name=groups,proto3" json:"groups,omitempty"` // contains filtered or unexported fields }
func (*UserInfo) Descriptor
deprecated
func (*UserInfo) GetAvatarUrl ¶
func (*UserInfo) ProtoMessage ¶
func (*UserInfo) ProtoMessage()
func (*UserInfo) ProtoReflect ¶
func (x *UserInfo) ProtoReflect() protoreflect.Message