Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterAppServer(s grpc.ServiceRegistrar, srv AppServer)
- type AppClient
- type AppServer
- type App_GetTokenCanceledClient
- type App_GetTokenCanceledServer
- type RefreshTokenRequest
- func (*RefreshTokenRequest) Descriptor() ([]byte, []int)deprecated
- func (x *RefreshTokenRequest) GetToken() string
- func (*RefreshTokenRequest) ProtoMessage()
- func (x *RefreshTokenRequest) ProtoReflect() protoreflect.Message
- func (x *RefreshTokenRequest) Reset()
- func (x *RefreshTokenRequest) String() string
- type TokenCanceled
- type TokenIDRequest
- type TokenStatus
- type UnimplementedAppServer
- func (UnimplementedAppServer) DestroyToken(context.Context, *RefreshTokenRequest) (*emptypb.Empty, error)
- func (UnimplementedAppServer) GetTokenCanceled(*emptypb.Empty, App_GetTokenCanceledServer) error
- func (UnimplementedAppServer) GetTokenStatus(context.Context, *TokenIDRequest) (*TokenStatus, error)
- func (UnimplementedAppServer) GetUserInfo(context.Context, *UserIDRequest) (*UserInfo, error)
- type UnsafeAppServer
- type UserIDRequest
- 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 ( App_GetTokenStatus_FullMethodName = "/appProto.App/GetTokenStatus" App_GetTokenCanceled_FullMethodName = "/appProto.App/GetTokenCanceled" App_DestroyToken_FullMethodName = "/appProto.App/DestroyToken" App_GetUserInfo_FullMethodName = "/appProto.App/GetUserInfo" )
Variables ¶
var App_ServiceDesc = grpc.ServiceDesc{ ServiceName: "appProto.App", HandlerType: (*AppServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetTokenStatus", Handler: _App_GetTokenStatus_Handler, }, { MethodName: "DestroyToken", Handler: _App_DestroyToken_Handler, }, { MethodName: "GetUserInfo", Handler: _App_GetUserInfo_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "GetTokenCanceled", Handler: _App_GetTokenCanceled_Handler, ServerStreams: true, }, }, Metadata: "protos/app.proto", }
App_ServiceDesc is the grpc.ServiceDesc for App service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_protos_app_proto protoreflect.FileDescriptor
Functions ¶
func RegisterAppServer ¶
func RegisterAppServer(s grpc.ServiceRegistrar, srv AppServer)
Types ¶
type AppClient ¶
type AppClient interface { GetTokenStatus(ctx context.Context, in *TokenIDRequest, opts ...grpc.CallOption) (*TokenStatus, error) GetTokenCanceled(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (App_GetTokenCanceledClient, error) DestroyToken(ctx context.Context, in *RefreshTokenRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) GetUserInfo(ctx context.Context, in *UserIDRequest, opts ...grpc.CallOption) (*UserInfo, error) }
AppClient is the client API for App 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 NewAppClient ¶
func NewAppClient(cc grpc.ClientConnInterface) AppClient
type AppServer ¶
type AppServer interface { GetTokenStatus(context.Context, *TokenIDRequest) (*TokenStatus, error) GetTokenCanceled(*emptypb.Empty, App_GetTokenCanceledServer) error DestroyToken(context.Context, *RefreshTokenRequest) (*emptypb.Empty, error) GetUserInfo(context.Context, *UserIDRequest) (*UserInfo, error) // contains filtered or unexported methods }
AppServer is the server API for App service. All implementations must embed UnimplementedAppServer for forward compatibility
type App_GetTokenCanceledClient ¶ added in v1.19.10
type App_GetTokenCanceledClient interface { Recv() (*TokenCanceled, error) grpc.ClientStream }
type App_GetTokenCanceledServer ¶ added in v1.19.10
type App_GetTokenCanceledServer interface { Send(*TokenCanceled) error grpc.ServerStream }
type RefreshTokenRequest ¶ added in v1.19.14
type RefreshTokenRequest struct { Token string `protobuf:"bytes,1,opt,name=Token,proto3" json:"Token,omitempty"` // contains filtered or unexported fields }
func (*RefreshTokenRequest) Descriptor
deprecated
added in
v1.19.14
func (*RefreshTokenRequest) Descriptor() ([]byte, []int)
Deprecated: Use RefreshTokenRequest.ProtoReflect.Descriptor instead.
func (*RefreshTokenRequest) GetToken ¶ added in v1.19.14
func (x *RefreshTokenRequest) GetToken() string
func (*RefreshTokenRequest) ProtoMessage ¶ added in v1.19.14
func (*RefreshTokenRequest) ProtoMessage()
func (*RefreshTokenRequest) ProtoReflect ¶ added in v1.19.14
func (x *RefreshTokenRequest) ProtoReflect() protoreflect.Message
func (*RefreshTokenRequest) Reset ¶ added in v1.19.14
func (x *RefreshTokenRequest) Reset()
func (*RefreshTokenRequest) String ¶ added in v1.19.14
func (x *RefreshTokenRequest) String() string
type TokenCanceled ¶ added in v1.19.10
type TokenCanceled struct { Id []uint64 `protobuf:"varint,1,rep,packed,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*TokenCanceled) Descriptor
deprecated
added in
v1.19.10
func (*TokenCanceled) Descriptor() ([]byte, []int)
Deprecated: Use TokenCanceled.ProtoReflect.Descriptor instead.
func (*TokenCanceled) GetId ¶ added in v1.19.10
func (x *TokenCanceled) GetId() []uint64
func (*TokenCanceled) ProtoMessage ¶ added in v1.19.10
func (*TokenCanceled) ProtoMessage()
func (*TokenCanceled) ProtoReflect ¶ added in v1.19.10
func (x *TokenCanceled) ProtoReflect() protoreflect.Message
func (*TokenCanceled) Reset ¶ added in v1.19.10
func (x *TokenCanceled) Reset()
func (*TokenCanceled) String ¶ added in v1.19.10
func (x *TokenCanceled) String() string
type TokenIDRequest ¶ added in v1.19.14
type TokenIDRequest struct { Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*TokenIDRequest) Descriptor
deprecated
added in
v1.19.14
func (*TokenIDRequest) Descriptor() ([]byte, []int)
Deprecated: Use TokenIDRequest.ProtoReflect.Descriptor instead.
func (*TokenIDRequest) GetId ¶ added in v1.19.14
func (x *TokenIDRequest) GetId() uint64
func (*TokenIDRequest) ProtoMessage ¶ added in v1.19.14
func (*TokenIDRequest) ProtoMessage()
func (*TokenIDRequest) ProtoReflect ¶ added in v1.19.14
func (x *TokenIDRequest) ProtoReflect() protoreflect.Message
func (*TokenIDRequest) Reset ¶ added in v1.19.14
func (x *TokenIDRequest) Reset()
func (*TokenIDRequest) String ¶ added in v1.19.14
func (x *TokenIDRequest) String() string
type TokenStatus ¶
type TokenStatus struct { Valid bool `protobuf:"varint,1,opt,name=valid,proto3" json:"valid,omitempty"` // contains filtered or unexported fields }
func (*TokenStatus) Descriptor
deprecated
func (*TokenStatus) Descriptor() ([]byte, []int)
Deprecated: Use TokenStatus.ProtoReflect.Descriptor instead.
func (*TokenStatus) GetValid ¶
func (x *TokenStatus) GetValid() bool
func (*TokenStatus) ProtoMessage ¶
func (*TokenStatus) ProtoMessage()
func (*TokenStatus) ProtoReflect ¶
func (x *TokenStatus) ProtoReflect() protoreflect.Message
func (*TokenStatus) Reset ¶
func (x *TokenStatus) Reset()
func (*TokenStatus) String ¶
func (x *TokenStatus) String() string
type UnimplementedAppServer ¶
type UnimplementedAppServer struct { }
UnimplementedAppServer must be embedded to have forward compatible implementations.
func (UnimplementedAppServer) DestroyToken ¶
func (UnimplementedAppServer) DestroyToken(context.Context, *RefreshTokenRequest) (*emptypb.Empty, error)
func (UnimplementedAppServer) GetTokenCanceled ¶ added in v1.19.10
func (UnimplementedAppServer) GetTokenCanceled(*emptypb.Empty, App_GetTokenCanceledServer) error
func (UnimplementedAppServer) GetTokenStatus ¶
func (UnimplementedAppServer) GetTokenStatus(context.Context, *TokenIDRequest) (*TokenStatus, error)
func (UnimplementedAppServer) GetUserInfo ¶
func (UnimplementedAppServer) GetUserInfo(context.Context, *UserIDRequest) (*UserInfo, error)
type UnsafeAppServer ¶
type UnsafeAppServer interface {
// contains filtered or unexported methods
}
UnsafeAppServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to AppServer will result in compilation errors.
type UserIDRequest ¶ added in v1.19.14
type UserIDRequest struct { Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*UserIDRequest) Descriptor
deprecated
added in
v1.19.14
func (*UserIDRequest) Descriptor() ([]byte, []int)
Deprecated: Use UserIDRequest.ProtoReflect.Descriptor instead.
func (*UserIDRequest) GetId ¶ added in v1.19.14
func (x *UserIDRequest) GetId() uint64
func (*UserIDRequest) ProtoMessage ¶ added in v1.19.14
func (*UserIDRequest) ProtoMessage()
func (*UserIDRequest) ProtoReflect ¶ added in v1.19.14
func (x *UserIDRequest) ProtoReflect() protoreflect.Message
func (*UserIDRequest) Reset ¶ added in v1.19.14
func (x *UserIDRequest) Reset()
func (*UserIDRequest) String ¶ added in v1.19.14
func (x *UserIDRequest) String() string
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