Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterAppServer(s grpc.ServiceRegistrar, srv AppServer)
- type AppClient
- type AppServer
- type App_WatchTokenOperationClient
- type App_WatchTokenOperationServer
- 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 TokenIDRequest
- type TokenOperation
- func (*TokenOperation) Descriptor() ([]byte, []int)deprecated
- func (x *TokenOperation) GetCanceledTokenId() []uint64
- func (x *TokenOperation) GetUserOperation() []*UserOperationID
- func (*TokenOperation) ProtoMessage()
- func (x *TokenOperation) ProtoReflect() protoreflect.Message
- func (x *TokenOperation) Reset()
- func (x *TokenOperation) String() string
- type TokenStatus
- type UnimplementedAppServer
- func (UnimplementedAppServer) DestroyToken(context.Context, *RefreshTokenRequest) (*emptypb.Empty, error)
- func (UnimplementedAppServer) GetTokenStatus(context.Context, *TokenIDRequest) (*TokenStatus, error)
- func (UnimplementedAppServer) GetUserInfo(context.Context, *UserIDRequest) (*UserInfo, error)
- func (UnimplementedAppServer) WatchTokenOperation(*emptypb.Empty, App_WatchTokenOperationServer) 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
- type UserOperationID
- func (*UserOperationID) Descriptor() ([]byte, []int)deprecated
- func (x *UserOperationID) GetOperationId() uint64
- func (x *UserOperationID) GetUid() uint64
- func (*UserOperationID) ProtoMessage()
- func (x *UserOperationID) ProtoReflect() protoreflect.Message
- func (x *UserOperationID) Reset()
- func (x *UserOperationID) String() string
Constants ¶
const ( App_GetTokenStatus_FullMethodName = "/appProto.App/GetTokenStatus" App_WatchTokenOperation_FullMethodName = "/appProto.App/WatchTokenOperation" 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: "WatchTokenOperation", Handler: _App_WatchTokenOperation_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) WatchTokenOperation(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (App_WatchTokenOperationClient, 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) WatchTokenOperation(*emptypb.Empty, App_WatchTokenOperationServer) 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_WatchTokenOperationClient ¶ added in v1.19.19
type App_WatchTokenOperationClient interface { Recv() (*TokenOperation, error) grpc.ClientStream }
type App_WatchTokenOperationServer ¶ added in v1.19.19
type App_WatchTokenOperationServer interface { Send(*TokenOperation) 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 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 TokenOperation ¶ added in v1.19.19
type TokenOperation struct { UserOperation []*UserOperationID `protobuf:"bytes,1,rep,name=user_operation,json=userOperation,proto3" json:"user_operation,omitempty"` CanceledTokenId []uint64 `protobuf:"varint,2,rep,packed,name=canceled_token_id,json=canceledTokenId,proto3" json:"canceled_token_id,omitempty"` // contains filtered or unexported fields }
func (*TokenOperation) Descriptor
deprecated
added in
v1.19.19
func (*TokenOperation) Descriptor() ([]byte, []int)
Deprecated: Use TokenOperation.ProtoReflect.Descriptor instead.
func (*TokenOperation) GetCanceledTokenId ¶ added in v1.19.19
func (x *TokenOperation) GetCanceledTokenId() []uint64
func (*TokenOperation) GetUserOperation ¶ added in v1.19.19
func (x *TokenOperation) GetUserOperation() []*UserOperationID
func (*TokenOperation) ProtoMessage ¶ added in v1.19.19
func (*TokenOperation) ProtoMessage()
func (*TokenOperation) ProtoReflect ¶ added in v1.19.19
func (x *TokenOperation) ProtoReflect() protoreflect.Message
func (*TokenOperation) Reset ¶ added in v1.19.19
func (x *TokenOperation) Reset()
func (*TokenOperation) String ¶ added in v1.19.19
func (x *TokenOperation) 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) GetTokenStatus ¶
func (UnimplementedAppServer) GetTokenStatus(context.Context, *TokenIDRequest) (*TokenStatus, error)
func (UnimplementedAppServer) GetUserInfo ¶
func (UnimplementedAppServer) GetUserInfo(context.Context, *UserIDRequest) (*UserInfo, error)
func (UnimplementedAppServer) WatchTokenOperation ¶ added in v1.19.19
func (UnimplementedAppServer) WatchTokenOperation(*emptypb.Empty, App_WatchTokenOperationServer) 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
type UserOperationID ¶ added in v1.19.19
type UserOperationID struct { Uid uint64 `protobuf:"varint,1,opt,name=uid,proto3" json:"uid,omitempty"` OperationId uint64 `protobuf:"varint,2,opt,name=operation_id,json=operationId,proto3" json:"operation_id,omitempty"` // contains filtered or unexported fields }
func (*UserOperationID) Descriptor
deprecated
added in
v1.19.19
func (*UserOperationID) Descriptor() ([]byte, []int)
Deprecated: Use UserOperationID.ProtoReflect.Descriptor instead.
func (*UserOperationID) GetOperationId ¶ added in v1.19.19
func (x *UserOperationID) GetOperationId() uint64
func (*UserOperationID) GetUid ¶ added in v1.19.19
func (x *UserOperationID) GetUid() uint64
func (*UserOperationID) ProtoMessage ¶ added in v1.19.19
func (*UserOperationID) ProtoMessage()
func (*UserOperationID) ProtoReflect ¶ added in v1.19.19
func (x *UserOperationID) ProtoReflect() protoreflect.Message
func (*UserOperationID) Reset ¶ added in v1.19.19
func (x *UserOperationID) Reset()
func (*UserOperationID) String ¶ added in v1.19.19
func (x *UserOperationID) String() string