Documentation ¶
Index ¶
- Variables
- type Service
- func (s *Service) Create(ctx context.Context, req *authpb.CreateAPIKeyRequest) (*authpb.APIKey, error)
- func (s *Service) Delete(ctx context.Context, req *uuidpb.UUID) (*types.Empty, error)
- func (s *Service) FetchOrgUserIDUsingAPIKey(ctx context.Context, key string) (uuid.UUID, uuid.UUID, error)
- func (s *Service) Get(ctx context.Context, req *authpb.GetAPIKeyRequest) (*authpb.GetAPIKeyResponse, error)
- func (s *Service) List(ctx context.Context, req *authpb.ListAPIKeyRequest) (*authpb.ListAPIKeyResponse, error)
- func (s *Service) LookupAPIKey(ctx context.Context, req *authpb.LookupAPIKeyRequest) (*authpb.LookupAPIKeyResponse, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrAPIKeyNotFound is used when the specified API key cannot be located. ErrAPIKeyNotFound = errors.New("invalid API key") )
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service is used to provision and manage API keys.
func (*Service) Create ¶
func (s *Service) Create(ctx context.Context, req *authpb.CreateAPIKeyRequest) (*authpb.APIKey, error)
Create a key with the org/user as an owner.
func (*Service) FetchOrgUserIDUsingAPIKey ¶
func (s *Service) FetchOrgUserIDUsingAPIKey(ctx context.Context, key string) (uuid.UUID, uuid.UUID, error)
FetchOrgUserIDUsingAPIKey gets the org and user ID based on the API key.
func (*Service) Get ¶
func (s *Service) Get(ctx context.Context, req *authpb.GetAPIKeyRequest) (*authpb.GetAPIKeyResponse, error)
Get returns a specific key if it's owned by the org.
func (*Service) List ¶
func (s *Service) List(ctx context.Context, req *authpb.ListAPIKeyRequest) (*authpb.ListAPIKeyResponse, error)
List returns all the keys belonging to an org.
func (*Service) LookupAPIKey ¶
func (s *Service) LookupAPIKey(ctx context.Context, req *authpb.LookupAPIKeyRequest) (*authpb.LookupAPIKeyResponse, error)
LookupAPIKey gets the complete API key information using just the Key.
Click to show internal directories.
Click to hide internal directories.