Documentation ¶
Index ¶
- Variables
- func RegisterTokenServiceServer(s grpc.ServiceRegistrar, srv TokenServiceServer)
- type CreateTokenRequest
- func (*CreateTokenRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CreateTokenRequest) GetAppId() string
- func (x *CreateTokenRequest) GetExpiresAt() *timestamppb.Timestamp
- func (x *CreateTokenRequest) GetScope() string
- func (x *CreateTokenRequest) GetUserId() string
- func (*CreateTokenRequest) ProtoMessage()
- func (x *CreateTokenRequest) ProtoReflect() protoreflect.Message
- func (x *CreateTokenRequest) Reset()
- func (x *CreateTokenRequest) String() string
- type CreateTokenResponse
- func (*CreateTokenResponse) Descriptor() ([]byte, []int)deprecated
- func (x *CreateTokenResponse) GetId() string
- func (*CreateTokenResponse) ProtoMessage()
- func (x *CreateTokenResponse) ProtoReflect() protoreflect.Message
- func (x *CreateTokenResponse) Reset()
- func (x *CreateTokenResponse) String() string
- type GetTokenRequest
- type GetTokenResponse
- type GetTokensRequest
- type GetTokensResponse
- type IssueTokenRequest
- type IssueTokenResponse
- func (*IssueTokenResponse) Descriptor() ([]byte, []int)deprecated
- func (x *IssueTokenResponse) GetValue() string
- func (*IssueTokenResponse) ProtoMessage()
- func (x *IssueTokenResponse) ProtoReflect() protoreflect.Message
- func (x *IssueTokenResponse) Reset()
- func (x *IssueTokenResponse) String() string
- type RevokeTokenRequest
- type RevokeTokenResponse
- type Token
- func (*Token) Descriptor() ([]byte, []int)deprecated
- func (x *Token) GetAppId() string
- func (x *Token) GetCreatedAt() *timestamppb.Timestamp
- func (x *Token) GetExpiresAt() *timestamppb.Timestamp
- func (x *Token) GetId() string
- func (x *Token) GetRevokedAt() *timestamppb.Timestamp
- func (x *Token) GetScope() string
- func (x *Token) GetUserId() string
- func (*Token) ProtoMessage()
- func (x *Token) ProtoReflect() protoreflect.Message
- func (x *Token) Reset()
- func (x *Token) String() string
- type TokenServiceClient
- type TokenServiceServer
- type UnimplementedTokenServiceServer
- func (UnimplementedTokenServiceServer) CreateToken(context.Context, *CreateTokenRequest) (*CreateTokenResponse, error)
- func (UnimplementedTokenServiceServer) GetToken(context.Context, *GetTokenRequest) (*GetTokenResponse, error)
- func (UnimplementedTokenServiceServer) GetTokens(context.Context, *GetTokensRequest) (*GetTokensResponse, error)
- func (UnimplementedTokenServiceServer) IssueToken(context.Context, *IssueTokenRequest) (*IssueTokenResponse, error)
- func (UnimplementedTokenServiceServer) RevokeToken(context.Context, *RevokeTokenRequest) (*RevokeTokenResponse, error)
- func (UnimplementedTokenServiceServer) VerifyToken(context.Context, *VerifyTokenRequest) (*VerifyTokenResponse, error)
- type UnsafeTokenServiceServer
- type VerifyTokenRequest
- func (*VerifyTokenRequest) Descriptor() ([]byte, []int)deprecated
- func (x *VerifyTokenRequest) GetValue() string
- func (*VerifyTokenRequest) ProtoMessage()
- func (x *VerifyTokenRequest) ProtoReflect() protoreflect.Message
- func (x *VerifyTokenRequest) Reset()
- func (x *VerifyTokenRequest) String() string
- type VerifyTokenResponse
- func (*VerifyTokenResponse) Descriptor() ([]byte, []int)deprecated
- func (x *VerifyTokenResponse) GetToken() *Token
- func (*VerifyTokenResponse) ProtoMessage()
- func (x *VerifyTokenResponse) ProtoReflect() protoreflect.Message
- func (x *VerifyTokenResponse) Reset()
- func (x *VerifyTokenResponse) String() string
Constants ¶
This section is empty.
Variables ¶
var File_basket_token_service_v1_token_proto protoreflect.FileDescriptor
var TokenService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "basket.token_service.v1.TokenService", HandlerType: (*TokenServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "CreateToken", Handler: _TokenService_CreateToken_Handler, }, { MethodName: "IssueToken", Handler: _TokenService_IssueToken_Handler, }, { MethodName: "VerifyToken", Handler: _TokenService_VerifyToken_Handler, }, { MethodName: "RevokeToken", Handler: _TokenService_RevokeToken_Handler, }, { MethodName: "GetToken", Handler: _TokenService_GetToken_Handler, }, { MethodName: "GetTokens", Handler: _TokenService_GetTokens_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "basket/token-service/v1/token.proto", }
TokenService_ServiceDesc is the grpc.ServiceDesc for TokenService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterTokenServiceServer ¶
func RegisterTokenServiceServer(s grpc.ServiceRegistrar, srv TokenServiceServer)
Types ¶
type CreateTokenRequest ¶
type CreateTokenRequest struct { UserId *string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3,oneof" json:"user_id,omitempty"` Scope *string `protobuf:"bytes,2,opt,name=scope,proto3,oneof" json:"scope,omitempty"` ExpiresAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=expires_at,json=expiresAt,proto3" json:"expires_at,omitempty"` AppId *string `protobuf:"bytes,4,opt,name=app_id,json=appId,proto3,oneof" json:"app_id,omitempty"` // contains filtered or unexported fields }
func (*CreateTokenRequest) Descriptor
deprecated
func (*CreateTokenRequest) Descriptor() ([]byte, []int)
Deprecated: Use CreateTokenRequest.ProtoReflect.Descriptor instead.
func (*CreateTokenRequest) GetAppId ¶ added in v0.2.187
func (x *CreateTokenRequest) GetAppId() string
func (*CreateTokenRequest) GetExpiresAt ¶
func (x *CreateTokenRequest) GetExpiresAt() *timestamppb.Timestamp
func (*CreateTokenRequest) GetScope ¶
func (x *CreateTokenRequest) GetScope() string
func (*CreateTokenRequest) GetUserId ¶
func (x *CreateTokenRequest) GetUserId() string
func (*CreateTokenRequest) ProtoMessage ¶
func (*CreateTokenRequest) ProtoMessage()
func (*CreateTokenRequest) ProtoReflect ¶
func (x *CreateTokenRequest) ProtoReflect() protoreflect.Message
func (*CreateTokenRequest) Reset ¶
func (x *CreateTokenRequest) Reset()
func (*CreateTokenRequest) String ¶
func (x *CreateTokenRequest) String() string
type CreateTokenResponse ¶
type CreateTokenResponse struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*CreateTokenResponse) Descriptor
deprecated
func (*CreateTokenResponse) Descriptor() ([]byte, []int)
Deprecated: Use CreateTokenResponse.ProtoReflect.Descriptor instead.
func (*CreateTokenResponse) GetId ¶
func (x *CreateTokenResponse) GetId() string
func (*CreateTokenResponse) ProtoMessage ¶
func (*CreateTokenResponse) ProtoMessage()
func (*CreateTokenResponse) ProtoReflect ¶
func (x *CreateTokenResponse) ProtoReflect() protoreflect.Message
func (*CreateTokenResponse) Reset ¶
func (x *CreateTokenResponse) Reset()
func (*CreateTokenResponse) String ¶
func (x *CreateTokenResponse) String() string
type GetTokenRequest ¶
type GetTokenRequest struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*GetTokenRequest) Descriptor
deprecated
func (*GetTokenRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetTokenRequest.ProtoReflect.Descriptor instead.
func (*GetTokenRequest) GetId ¶
func (x *GetTokenRequest) GetId() string
func (*GetTokenRequest) ProtoMessage ¶
func (*GetTokenRequest) ProtoMessage()
func (*GetTokenRequest) ProtoReflect ¶
func (x *GetTokenRequest) ProtoReflect() protoreflect.Message
func (*GetTokenRequest) Reset ¶
func (x *GetTokenRequest) Reset()
func (*GetTokenRequest) String ¶
func (x *GetTokenRequest) String() string
type GetTokenResponse ¶
type GetTokenResponse struct { Token *Token `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` // contains filtered or unexported fields }
func (*GetTokenResponse) Descriptor
deprecated
func (*GetTokenResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetTokenResponse.ProtoReflect.Descriptor instead.
func (*GetTokenResponse) GetToken ¶
func (x *GetTokenResponse) GetToken() *Token
func (*GetTokenResponse) ProtoMessage ¶
func (*GetTokenResponse) ProtoMessage()
func (*GetTokenResponse) ProtoReflect ¶
func (x *GetTokenResponse) ProtoReflect() protoreflect.Message
func (*GetTokenResponse) Reset ¶
func (x *GetTokenResponse) Reset()
func (*GetTokenResponse) String ¶
func (x *GetTokenResponse) String() string
type GetTokensRequest ¶
type GetTokensRequest struct { Ids []string `protobuf:"bytes,2,rep,name=ids,proto3" json:"ids,omitempty"` // contains filtered or unexported fields }
func (*GetTokensRequest) Descriptor
deprecated
func (*GetTokensRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetTokensRequest.ProtoReflect.Descriptor instead.
func (*GetTokensRequest) GetIds ¶
func (x *GetTokensRequest) GetIds() []string
func (*GetTokensRequest) ProtoMessage ¶
func (*GetTokensRequest) ProtoMessage()
func (*GetTokensRequest) ProtoReflect ¶
func (x *GetTokensRequest) ProtoReflect() protoreflect.Message
func (*GetTokensRequest) Reset ¶
func (x *GetTokensRequest) Reset()
func (*GetTokensRequest) String ¶
func (x *GetTokensRequest) String() string
type GetTokensResponse ¶
type GetTokensResponse struct { Tokens []*Token `protobuf:"bytes,1,rep,name=tokens,proto3" json:"tokens,omitempty"` // contains filtered or unexported fields }
func (*GetTokensResponse) Descriptor
deprecated
func (*GetTokensResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetTokensResponse.ProtoReflect.Descriptor instead.
func (*GetTokensResponse) GetTokens ¶
func (x *GetTokensResponse) GetTokens() []*Token
func (*GetTokensResponse) ProtoMessage ¶
func (*GetTokensResponse) ProtoMessage()
func (*GetTokensResponse) ProtoReflect ¶
func (x *GetTokensResponse) ProtoReflect() protoreflect.Message
func (*GetTokensResponse) Reset ¶
func (x *GetTokensResponse) Reset()
func (*GetTokensResponse) String ¶
func (x *GetTokensResponse) String() string
type IssueTokenRequest ¶
type IssueTokenRequest struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*IssueTokenRequest) Descriptor
deprecated
func (*IssueTokenRequest) Descriptor() ([]byte, []int)
Deprecated: Use IssueTokenRequest.ProtoReflect.Descriptor instead.
func (*IssueTokenRequest) GetId ¶
func (x *IssueTokenRequest) GetId() string
func (*IssueTokenRequest) ProtoMessage ¶
func (*IssueTokenRequest) ProtoMessage()
func (*IssueTokenRequest) ProtoReflect ¶
func (x *IssueTokenRequest) ProtoReflect() protoreflect.Message
func (*IssueTokenRequest) Reset ¶
func (x *IssueTokenRequest) Reset()
func (*IssueTokenRequest) String ¶
func (x *IssueTokenRequest) String() string
type IssueTokenResponse ¶
type IssueTokenResponse struct { Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` // contains filtered or unexported fields }
func (*IssueTokenResponse) Descriptor
deprecated
func (*IssueTokenResponse) Descriptor() ([]byte, []int)
Deprecated: Use IssueTokenResponse.ProtoReflect.Descriptor instead.
func (*IssueTokenResponse) GetValue ¶
func (x *IssueTokenResponse) GetValue() string
func (*IssueTokenResponse) ProtoMessage ¶
func (*IssueTokenResponse) ProtoMessage()
func (*IssueTokenResponse) ProtoReflect ¶
func (x *IssueTokenResponse) ProtoReflect() protoreflect.Message
func (*IssueTokenResponse) Reset ¶
func (x *IssueTokenResponse) Reset()
func (*IssueTokenResponse) String ¶
func (x *IssueTokenResponse) String() string
type RevokeTokenRequest ¶
type RevokeTokenRequest struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*RevokeTokenRequest) Descriptor
deprecated
func (*RevokeTokenRequest) Descriptor() ([]byte, []int)
Deprecated: Use RevokeTokenRequest.ProtoReflect.Descriptor instead.
func (*RevokeTokenRequest) GetId ¶
func (x *RevokeTokenRequest) GetId() string
func (*RevokeTokenRequest) ProtoMessage ¶
func (*RevokeTokenRequest) ProtoMessage()
func (*RevokeTokenRequest) ProtoReflect ¶
func (x *RevokeTokenRequest) ProtoReflect() protoreflect.Message
func (*RevokeTokenRequest) Reset ¶
func (x *RevokeTokenRequest) Reset()
func (*RevokeTokenRequest) String ¶
func (x *RevokeTokenRequest) String() string
type RevokeTokenResponse ¶
type RevokeTokenResponse struct {
// contains filtered or unexported fields
}
func (*RevokeTokenResponse) Descriptor
deprecated
func (*RevokeTokenResponse) Descriptor() ([]byte, []int)
Deprecated: Use RevokeTokenResponse.ProtoReflect.Descriptor instead.
func (*RevokeTokenResponse) ProtoMessage ¶
func (*RevokeTokenResponse) ProtoMessage()
func (*RevokeTokenResponse) ProtoReflect ¶
func (x *RevokeTokenResponse) ProtoReflect() protoreflect.Message
func (*RevokeTokenResponse) Reset ¶
func (x *RevokeTokenResponse) Reset()
func (*RevokeTokenResponse) String ¶
func (x *RevokeTokenResponse) String() string
type Token ¶
type Token struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` UserId *string `protobuf:"bytes,2,opt,name=user_id,json=userId,proto3,oneof" json:"user_id,omitempty"` Scope *string `protobuf:"bytes,3,opt,name=scope,proto3,oneof" json:"scope,omitempty"` CreatedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` RevokedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=revoked_at,json=revokedAt,proto3" json:"revoked_at,omitempty"` ExpiresAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=expires_at,json=expiresAt,proto3" json:"expires_at,omitempty"` AppId *string `protobuf:"bytes,7,opt,name=app_id,json=appId,proto3,oneof" json:"app_id,omitempty"` // contains filtered or unexported fields }
func (*Token) Descriptor
deprecated
func (*Token) GetCreatedAt ¶
func (x *Token) GetCreatedAt() *timestamppb.Timestamp
func (*Token) GetExpiresAt ¶
func (x *Token) GetExpiresAt() *timestamppb.Timestamp
func (*Token) GetRevokedAt ¶
func (x *Token) GetRevokedAt() *timestamppb.Timestamp
func (*Token) ProtoMessage ¶
func (*Token) ProtoMessage()
func (*Token) ProtoReflect ¶
func (x *Token) ProtoReflect() protoreflect.Message
type TokenServiceClient ¶
type TokenServiceClient interface { CreateToken(ctx context.Context, in *CreateTokenRequest, opts ...grpc.CallOption) (*CreateTokenResponse, error) IssueToken(ctx context.Context, in *IssueTokenRequest, opts ...grpc.CallOption) (*IssueTokenResponse, error) VerifyToken(ctx context.Context, in *VerifyTokenRequest, opts ...grpc.CallOption) (*VerifyTokenResponse, error) RevokeToken(ctx context.Context, in *RevokeTokenRequest, opts ...grpc.CallOption) (*RevokeTokenResponse, error) GetToken(ctx context.Context, in *GetTokenRequest, opts ...grpc.CallOption) (*GetTokenResponse, error) GetTokens(ctx context.Context, in *GetTokensRequest, opts ...grpc.CallOption) (*GetTokensResponse, error) }
TokenServiceClient is the client API for TokenService 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 NewTokenServiceClient ¶
func NewTokenServiceClient(cc grpc.ClientConnInterface) TokenServiceClient
type TokenServiceServer ¶
type TokenServiceServer interface { CreateToken(context.Context, *CreateTokenRequest) (*CreateTokenResponse, error) IssueToken(context.Context, *IssueTokenRequest) (*IssueTokenResponse, error) VerifyToken(context.Context, *VerifyTokenRequest) (*VerifyTokenResponse, error) RevokeToken(context.Context, *RevokeTokenRequest) (*RevokeTokenResponse, error) GetToken(context.Context, *GetTokenRequest) (*GetTokenResponse, error) GetTokens(context.Context, *GetTokensRequest) (*GetTokensResponse, error) // contains filtered or unexported methods }
TokenServiceServer is the server API for TokenService service. All implementations must embed UnimplementedTokenServiceServer for forward compatibility
type UnimplementedTokenServiceServer ¶
type UnimplementedTokenServiceServer struct { }
UnimplementedTokenServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedTokenServiceServer) CreateToken ¶
func (UnimplementedTokenServiceServer) CreateToken(context.Context, *CreateTokenRequest) (*CreateTokenResponse, error)
func (UnimplementedTokenServiceServer) GetToken ¶
func (UnimplementedTokenServiceServer) GetToken(context.Context, *GetTokenRequest) (*GetTokenResponse, error)
func (UnimplementedTokenServiceServer) GetTokens ¶
func (UnimplementedTokenServiceServer) GetTokens(context.Context, *GetTokensRequest) (*GetTokensResponse, error)
func (UnimplementedTokenServiceServer) IssueToken ¶
func (UnimplementedTokenServiceServer) IssueToken(context.Context, *IssueTokenRequest) (*IssueTokenResponse, error)
func (UnimplementedTokenServiceServer) RevokeToken ¶
func (UnimplementedTokenServiceServer) RevokeToken(context.Context, *RevokeTokenRequest) (*RevokeTokenResponse, error)
func (UnimplementedTokenServiceServer) VerifyToken ¶ added in v0.2.168
func (UnimplementedTokenServiceServer) VerifyToken(context.Context, *VerifyTokenRequest) (*VerifyTokenResponse, error)
type UnsafeTokenServiceServer ¶
type UnsafeTokenServiceServer interface {
// contains filtered or unexported methods
}
UnsafeTokenServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to TokenServiceServer will result in compilation errors.
type VerifyTokenRequest ¶
type VerifyTokenRequest struct { Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` // contains filtered or unexported fields }
func (*VerifyTokenRequest) Descriptor
deprecated
func (*VerifyTokenRequest) Descriptor() ([]byte, []int)
Deprecated: Use VerifyTokenRequest.ProtoReflect.Descriptor instead.
func (*VerifyTokenRequest) GetValue ¶
func (x *VerifyTokenRequest) GetValue() string
func (*VerifyTokenRequest) ProtoMessage ¶
func (*VerifyTokenRequest) ProtoMessage()
func (*VerifyTokenRequest) ProtoReflect ¶
func (x *VerifyTokenRequest) ProtoReflect() protoreflect.Message
func (*VerifyTokenRequest) Reset ¶
func (x *VerifyTokenRequest) Reset()
func (*VerifyTokenRequest) String ¶
func (x *VerifyTokenRequest) String() string
type VerifyTokenResponse ¶
type VerifyTokenResponse struct { Token *Token `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` // contains filtered or unexported fields }
func (*VerifyTokenResponse) Descriptor
deprecated
func (*VerifyTokenResponse) Descriptor() ([]byte, []int)
Deprecated: Use VerifyTokenResponse.ProtoReflect.Descriptor instead.
func (*VerifyTokenResponse) GetToken ¶
func (x *VerifyTokenResponse) GetToken() *Token
func (*VerifyTokenResponse) ProtoMessage ¶
func (*VerifyTokenResponse) ProtoMessage()
func (*VerifyTokenResponse) ProtoReflect ¶
func (x *VerifyTokenResponse) ProtoReflect() protoreflect.Message
func (*VerifyTokenResponse) Reset ¶
func (x *VerifyTokenResponse) Reset()
func (*VerifyTokenResponse) String ¶
func (x *VerifyTokenResponse) String() string