Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterAppServer(s grpc.ServiceRegistrar, srv AppServer)
- type AppClient
- type AppServer
- type App_GetTokenCanceledClient
- type App_GetTokenCanceledServer
- type Token
- type TokenCanceled
- type TokenRequest
- type TokenStatus
- type UnimplementedAppServer
- func (UnimplementedAppServer) DestroyToken(context.Context, *Token) (*emptypb.Empty, error)
- func (UnimplementedAppServer) GetTokenCanceled(*emptypb.Empty, App_GetTokenCanceledServer) error
- func (UnimplementedAppServer) GetTokenStatus(context.Context, *TokenRequest) (*TokenStatus, error)
- func (UnimplementedAppServer) GetUserInfo(context.Context, *TokenRequest) (*UserInfo, error)
- type UnsafeAppServer
- 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 *TokenRequest, opts ...grpc.CallOption) (*TokenStatus, error) GetTokenCanceled(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (App_GetTokenCanceledClient, error) DestroyToken(ctx context.Context, in *Token, opts ...grpc.CallOption) (*emptypb.Empty, error) GetUserInfo(ctx context.Context, in *TokenRequest, 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, *TokenRequest) (*TokenStatus, error) GetTokenCanceled(*emptypb.Empty, App_GetTokenCanceledServer) error DestroyToken(context.Context, *Token) (*emptypb.Empty, error) GetUserInfo(context.Context, *TokenRequest) (*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 Token ¶ added in v1.19.11
type Token struct { Token string `protobuf:"bytes,1,opt,name=Token,proto3" json:"Token,omitempty"` // contains filtered or unexported fields }
func (*Token) Descriptor
deprecated
added in
v1.19.11
func (*Token) ProtoMessage ¶ added in v1.19.11
func (*Token) ProtoMessage()
func (*Token) ProtoReflect ¶ added in v1.19.11
func (x *Token) ProtoReflect() protoreflect.Message
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 TokenRequest ¶
type TokenRequest struct { Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*TokenRequest) Descriptor
deprecated
func (*TokenRequest) Descriptor() ([]byte, []int)
Deprecated: Use TokenRequest.ProtoReflect.Descriptor instead.
func (*TokenRequest) GetId ¶
func (x *TokenRequest) GetId() uint64
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 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) GetTokenCanceled ¶ added in v1.19.10
func (UnimplementedAppServer) GetTokenCanceled(*emptypb.Empty, App_GetTokenCanceledServer) error
func (UnimplementedAppServer) GetTokenStatus ¶
func (UnimplementedAppServer) GetTokenStatus(context.Context, *TokenRequest) (*TokenStatus, error)
func (UnimplementedAppServer) GetUserInfo ¶
func (UnimplementedAppServer) GetUserInfo(context.Context, *TokenRequest) (*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 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