apikeys

package
v0.50.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 20, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApiKeyService

type ApiKeyService struct {
	// contains filtered or unexported fields
}

func (*ApiKeyService) Generate

func (s *ApiKeyService) Generate(keyType apikey.ApiKeyType, name string) (string, error)

func (*ApiKeyService) IsProjectApiKey

func (s *ApiKeyService) IsProjectApiKey(apiKey string) bool

func (*ApiKeyService) IsValidApiKey

func (s *ApiKeyService) IsValidApiKey(apiKey string) bool

func (*ApiKeyService) IsWorkspaceApiKey added in v0.15.0

func (s *ApiKeyService) IsWorkspaceApiKey(apiKey string) bool

func (*ApiKeyService) ListClientKeys

func (s *ApiKeyService) ListClientKeys() ([]*apikey.ApiKey, error)

func (*ApiKeyService) Revoke

func (s *ApiKeyService) Revoke(name string) error

type ApiKeyServiceConfig

type ApiKeyServiceConfig struct {
	ApiKeyStore apikey.Store
}

type IApiKeyService added in v0.12.0

type IApiKeyService interface {
	Generate(keyType apikey.ApiKeyType, name string) (string, error)
	IsProjectApiKey(apiKey string) bool
	IsWorkspaceApiKey(apiKey string) bool
	IsValidApiKey(apiKey string) bool
	ListClientKeys() ([]*apikey.ApiKey, error)
	Revoke(name string) error
}

func NewApiKeyService

func NewApiKeyService(config ApiKeyServiceConfig) IApiKeyService

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL