Documentation ¶
Index ¶
- Variables
- func ErrInternalError() errors.Error
- func ErrInternalStore() errors.Error
- func ErrInvalidArgument() errors.Error
- func ErrInvalidXTkeelAuthToken() errors.Error
- func ErrResourceNotFound() errors.Error
- func ErrUnknown() errors.Error
- func RegisterEntityTokenHTTPServer(container *go_restful.Container, srv EntityTokenHTTPServer)
- func RegisterEntityTokenServer(s grpc.ServiceRegistrar, srv EntityTokenServer)
- type CreateEntityTokenRequest
- func (*CreateEntityTokenRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CreateEntityTokenRequest) GetBody() *TokenRequestBody
- func (*CreateEntityTokenRequest) ProtoMessage()
- func (x *CreateEntityTokenRequest) ProtoReflect() protoreflect.Message
- func (x *CreateEntityTokenRequest) Reset()
- func (x *CreateEntityTokenRequest) String() string
- type CreateEntityTokenResponse
- func (*CreateEntityTokenResponse) Descriptor() ([]byte, []int)deprecated
- func (x *CreateEntityTokenResponse) GetToken() string
- func (*CreateEntityTokenResponse) ProtoMessage()
- func (x *CreateEntityTokenResponse) ProtoReflect() protoreflect.Message
- func (x *CreateEntityTokenResponse) Reset()
- func (x *CreateEntityTokenResponse) String() string
- type EntityTokenClient
- type EntityTokenHTTPHandler
- func (h *EntityTokenHTTPHandler) CreateEntityToken(req *go_restful.Request, resp *go_restful.Response)
- func (h *EntityTokenHTTPHandler) DeleteEntityToken(req *go_restful.Request, resp *go_restful.Response)
- func (h *EntityTokenHTTPHandler) TokenInfo(req *go_restful.Request, resp *go_restful.Response)
- type EntityTokenHTTPServer
- type EntityTokenServer
- type Error
- type TokenInfoRequest
- type TokenInfoResponse
- func (*TokenInfoResponse) Descriptor() ([]byte, []int)deprecated
- func (x *TokenInfoResponse) GetCreatedAt() int64
- func (x *TokenInfoResponse) GetEntityId() string
- func (x *TokenInfoResponse) GetEntityType() string
- func (x *TokenInfoResponse) GetExpiredAt() int64
- func (x *TokenInfoResponse) GetOwner() string
- func (x *TokenInfoResponse) GetTenantId() string
- func (*TokenInfoResponse) ProtoMessage()
- func (x *TokenInfoResponse) ProtoReflect() protoreflect.Message
- func (x *TokenInfoResponse) Reset()
- func (x *TokenInfoResponse) String() string
- type TokenRequestBody
- func (*TokenRequestBody) Descriptor() ([]byte, []int)deprecated
- func (x *TokenRequestBody) GetEntityId() string
- func (x *TokenRequestBody) GetEntityType() string
- func (x *TokenRequestBody) GetExpiresIn() int64
- func (x *TokenRequestBody) GetOwner() string
- func (*TokenRequestBody) ProtoMessage()
- func (x *TokenRequestBody) ProtoReflect() protoreflect.Message
- func (x *TokenRequestBody) Reset()
- func (x *TokenRequestBody) String() string
- type UnimplementedEntityTokenServer
- func (UnimplementedEntityTokenServer) CreateEntityToken(context.Context, *CreateEntityTokenRequest) (*CreateEntityTokenResponse, error)
- func (UnimplementedEntityTokenServer) DeleteEntityToken(context.Context, *TokenInfoRequest) (*emptypb.Empty, error)
- func (UnimplementedEntityTokenServer) TokenInfo(context.Context, *TokenInfoRequest) (*TokenInfoResponse, error)
- type UnsafeEntityTokenServer
Constants ¶
This section is empty.
Variables ¶
var ( Error_name = map[int32]string{ 0: "ERR_UNKNOWN", 1: "ERR_INVALID_ARGUMENT", 2: "ERR_INTERNAL_STORE", 3: "ERR_INTERNAL_ERROR", 4: "ERR_RESOURCE_NOT_FOUND", 5: "ERR_INVALID_X_TKEEL_AUTH_TOKEN", } Error_value = map[string]int32{ "ERR_UNKNOWN": 0, "ERR_INVALID_ARGUMENT": 1, "ERR_INTERNAL_STORE": 2, "ERR_INTERNAL_ERROR": 3, "ERR_RESOURCE_NOT_FOUND": 4, "ERR_INVALID_X_TKEEL_AUTH_TOKEN": 5, } )
Enum value maps for Error.
var EntityToken_ServiceDesc = grpc.ServiceDesc{ ServiceName: "io.tkeel.security.api.entity.v1.EntityToken", HandlerType: (*EntityTokenServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "CreateEntityToken", Handler: _EntityToken_CreateEntityToken_Handler, }, { MethodName: "TokenInfo", Handler: _EntityToken_TokenInfo_Handler, }, { MethodName: "DeleteEntityToken", Handler: _EntityToken_DeleteEntityToken_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "api/entity/v1/entity_token.proto", }
EntityToken_ServiceDesc is the grpc.ServiceDesc for EntityToken service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_api_entity_v1_entity_token_proto protoreflect.FileDescriptor
var File_api_entity_v1_error_proto protoreflect.FileDescriptor
Functions ¶
func ErrInternalError ¶
func ErrInternalStore ¶
func ErrInvalidArgument ¶
func ErrInvalidXTkeelAuthToken ¶ added in v1.0.0
func ErrResourceNotFound ¶
func ErrUnknown ¶
func RegisterEntityTokenHTTPServer ¶
func RegisterEntityTokenHTTPServer(container *go_restful.Container, srv EntityTokenHTTPServer)
func RegisterEntityTokenServer ¶
func RegisterEntityTokenServer(s grpc.ServiceRegistrar, srv EntityTokenServer)
Types ¶
type CreateEntityTokenRequest ¶
type CreateEntityTokenRequest struct { Body *TokenRequestBody `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` // contains filtered or unexported fields }
func (*CreateEntityTokenRequest) Descriptor
deprecated
func (*CreateEntityTokenRequest) Descriptor() ([]byte, []int)
Deprecated: Use CreateEntityTokenRequest.ProtoReflect.Descriptor instead.
func (*CreateEntityTokenRequest) GetBody ¶
func (x *CreateEntityTokenRequest) GetBody() *TokenRequestBody
func (*CreateEntityTokenRequest) ProtoMessage ¶
func (*CreateEntityTokenRequest) ProtoMessage()
func (*CreateEntityTokenRequest) ProtoReflect ¶
func (x *CreateEntityTokenRequest) ProtoReflect() protoreflect.Message
func (*CreateEntityTokenRequest) Reset ¶
func (x *CreateEntityTokenRequest) Reset()
func (*CreateEntityTokenRequest) String ¶
func (x *CreateEntityTokenRequest) String() string
type CreateEntityTokenResponse ¶
type CreateEntityTokenResponse struct { Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` // contains filtered or unexported fields }
func (*CreateEntityTokenResponse) Descriptor
deprecated
func (*CreateEntityTokenResponse) Descriptor() ([]byte, []int)
Deprecated: Use CreateEntityTokenResponse.ProtoReflect.Descriptor instead.
func (*CreateEntityTokenResponse) GetToken ¶
func (x *CreateEntityTokenResponse) GetToken() string
func (*CreateEntityTokenResponse) ProtoMessage ¶
func (*CreateEntityTokenResponse) ProtoMessage()
func (*CreateEntityTokenResponse) ProtoReflect ¶
func (x *CreateEntityTokenResponse) ProtoReflect() protoreflect.Message
func (*CreateEntityTokenResponse) Reset ¶
func (x *CreateEntityTokenResponse) Reset()
func (*CreateEntityTokenResponse) String ¶
func (x *CreateEntityTokenResponse) String() string
type EntityTokenClient ¶
type EntityTokenClient interface { CreateEntityToken(ctx context.Context, in *CreateEntityTokenRequest, opts ...grpc.CallOption) (*CreateEntityTokenResponse, error) TokenInfo(ctx context.Context, in *TokenInfoRequest, opts ...grpc.CallOption) (*TokenInfoResponse, error) DeleteEntityToken(ctx context.Context, in *TokenInfoRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) }
EntityTokenClient is the client API for EntityToken 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 NewEntityTokenClient ¶
func NewEntityTokenClient(cc grpc.ClientConnInterface) EntityTokenClient
type EntityTokenHTTPHandler ¶
type EntityTokenHTTPHandler struct {
// contains filtered or unexported fields
}
func (*EntityTokenHTTPHandler) CreateEntityToken ¶
func (h *EntityTokenHTTPHandler) CreateEntityToken(req *go_restful.Request, resp *go_restful.Response)
func (*EntityTokenHTTPHandler) DeleteEntityToken ¶
func (h *EntityTokenHTTPHandler) DeleteEntityToken(req *go_restful.Request, resp *go_restful.Response)
func (*EntityTokenHTTPHandler) TokenInfo ¶
func (h *EntityTokenHTTPHandler) TokenInfo(req *go_restful.Request, resp *go_restful.Response)
type EntityTokenHTTPServer ¶
type EntityTokenHTTPServer interface { CreateEntityToken(context.Context, *CreateEntityTokenRequest) (*CreateEntityTokenResponse, error) DeleteEntityToken(context.Context, *TokenInfoRequest) (*emptypb.Empty, error) TokenInfo(context.Context, *TokenInfoRequest) (*TokenInfoResponse, error) }
type EntityTokenServer ¶
type EntityTokenServer interface { CreateEntityToken(context.Context, *CreateEntityTokenRequest) (*CreateEntityTokenResponse, error) TokenInfo(context.Context, *TokenInfoRequest) (*TokenInfoResponse, error) DeleteEntityToken(context.Context, *TokenInfoRequest) (*emptypb.Empty, error) // contains filtered or unexported methods }
EntityTokenServer is the server API for EntityToken service. All implementations must embed UnimplementedEntityTokenServer for forward compatibility
type Error ¶
type Error int32
@plugins=protoc-gen-go-errors 错误
const ( // @msg=未知类型 // @code=UNKNOWN Error_ERR_UNKNOWN Error = 0 // @msg=请求参数无效 // @code=INVALID_ARGUMENT Error_ERR_INVALID_ARGUMENT Error = 1 // @msg=请求后端存储错误 // @code=INTERNAL Error_ERR_INTERNAL_STORE Error = 2 // @msg=内部错误 // @code=INTERNAL Error_ERR_INTERNAL_ERROR Error = 3 // @msg=资源不存在 // @code=INTERNAL Error_ERR_RESOURCE_NOT_FOUND Error = 4 // @msg=无效的x-tKeel-authtoken // @code=UNAUTHENTICATED Error_ERR_INVALID_X_TKEEL_AUTH_TOKEN Error = 5 )
func (Error) Descriptor ¶
func (Error) Descriptor() protoreflect.EnumDescriptor
func (Error) EnumDescriptor
deprecated
func (Error) Number ¶
func (x Error) Number() protoreflect.EnumNumber
func (Error) Type ¶
func (Error) Type() protoreflect.EnumType
type TokenInfoRequest ¶
type TokenInfoRequest struct { Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` // contains filtered or unexported fields }
func (*TokenInfoRequest) Descriptor
deprecated
func (*TokenInfoRequest) Descriptor() ([]byte, []int)
Deprecated: Use TokenInfoRequest.ProtoReflect.Descriptor instead.
func (*TokenInfoRequest) GetToken ¶
func (x *TokenInfoRequest) GetToken() string
func (*TokenInfoRequest) ProtoMessage ¶
func (*TokenInfoRequest) ProtoMessage()
func (*TokenInfoRequest) ProtoReflect ¶
func (x *TokenInfoRequest) ProtoReflect() protoreflect.Message
func (*TokenInfoRequest) Reset ¶
func (x *TokenInfoRequest) Reset()
func (*TokenInfoRequest) String ¶
func (x *TokenInfoRequest) String() string
type TokenInfoResponse ¶
type TokenInfoResponse struct { EntityId string `protobuf:"bytes,1,opt,name=entity_id,json=entityId,proto3" json:"entity_id,omitempty"` EntityType string `protobuf:"bytes,2,opt,name=entity_type,json=entityType,proto3" json:"entity_type,omitempty"` Owner string `protobuf:"bytes,3,opt,name=owner,proto3" json:"owner,omitempty"` TenantId string `protobuf:"bytes,4,opt,name=tenant_id,json=tenantId,proto3" json:"tenant_id,omitempty"` CreatedAt int64 `protobuf:"varint,5,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` ExpiredAt int64 `protobuf:"varint,6,opt,name=expired_at,json=expiredAt,proto3" json:"expired_at,omitempty"` // contains filtered or unexported fields }
func (*TokenInfoResponse) Descriptor
deprecated
func (*TokenInfoResponse) Descriptor() ([]byte, []int)
Deprecated: Use TokenInfoResponse.ProtoReflect.Descriptor instead.
func (*TokenInfoResponse) GetCreatedAt ¶
func (x *TokenInfoResponse) GetCreatedAt() int64
func (*TokenInfoResponse) GetEntityId ¶
func (x *TokenInfoResponse) GetEntityId() string
func (*TokenInfoResponse) GetEntityType ¶
func (x *TokenInfoResponse) GetEntityType() string
func (*TokenInfoResponse) GetExpiredAt ¶
func (x *TokenInfoResponse) GetExpiredAt() int64
func (*TokenInfoResponse) GetOwner ¶
func (x *TokenInfoResponse) GetOwner() string
func (*TokenInfoResponse) GetTenantId ¶ added in v1.0.0
func (x *TokenInfoResponse) GetTenantId() string
func (*TokenInfoResponse) ProtoMessage ¶
func (*TokenInfoResponse) ProtoMessage()
func (*TokenInfoResponse) ProtoReflect ¶
func (x *TokenInfoResponse) ProtoReflect() protoreflect.Message
func (*TokenInfoResponse) Reset ¶
func (x *TokenInfoResponse) Reset()
func (*TokenInfoResponse) String ¶
func (x *TokenInfoResponse) String() string
type TokenRequestBody ¶
type TokenRequestBody struct { EntityType string `protobuf:"bytes,1,opt,name=entity_type,json=entityType,proto3" json:"entity_type,omitempty"` EntityId string `protobuf:"bytes,2,opt,name=entity_id,json=entityId,proto3" json:"entity_id,omitempty"` Owner string `protobuf:"bytes,3,opt,name=owner,proto3" json:"owner,omitempty"` ExpiresIn int64 `protobuf:"varint,4,opt,name=expires_in,json=expiresIn,proto3" json:"expires_in,omitempty"` // contains filtered or unexported fields }
func (*TokenRequestBody) Descriptor
deprecated
func (*TokenRequestBody) Descriptor() ([]byte, []int)
Deprecated: Use TokenRequestBody.ProtoReflect.Descriptor instead.
func (*TokenRequestBody) GetEntityId ¶
func (x *TokenRequestBody) GetEntityId() string
func (*TokenRequestBody) GetEntityType ¶
func (x *TokenRequestBody) GetEntityType() string
func (*TokenRequestBody) GetExpiresIn ¶
func (x *TokenRequestBody) GetExpiresIn() int64
func (*TokenRequestBody) GetOwner ¶
func (x *TokenRequestBody) GetOwner() string
func (*TokenRequestBody) ProtoMessage ¶
func (*TokenRequestBody) ProtoMessage()
func (*TokenRequestBody) ProtoReflect ¶
func (x *TokenRequestBody) ProtoReflect() protoreflect.Message
func (*TokenRequestBody) Reset ¶
func (x *TokenRequestBody) Reset()
func (*TokenRequestBody) String ¶
func (x *TokenRequestBody) String() string
type UnimplementedEntityTokenServer ¶
type UnimplementedEntityTokenServer struct { }
UnimplementedEntityTokenServer must be embedded to have forward compatible implementations.
func (UnimplementedEntityTokenServer) CreateEntityToken ¶
func (UnimplementedEntityTokenServer) CreateEntityToken(context.Context, *CreateEntityTokenRequest) (*CreateEntityTokenResponse, error)
func (UnimplementedEntityTokenServer) DeleteEntityToken ¶
func (UnimplementedEntityTokenServer) DeleteEntityToken(context.Context, *TokenInfoRequest) (*emptypb.Empty, error)
func (UnimplementedEntityTokenServer) TokenInfo ¶
func (UnimplementedEntityTokenServer) TokenInfo(context.Context, *TokenInfoRequest) (*TokenInfoResponse, error)
type UnsafeEntityTokenServer ¶
type UnsafeEntityTokenServer interface {
// contains filtered or unexported methods
}
UnsafeEntityTokenServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to EntityTokenServer will result in compilation errors.