Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidAPIKey = errors.New("Invalid API key")
Functions ¶
func NewAPIKeyCache ¶
func NewAPIKeyCache(cacheSize int) *apiKeyCache
NewAPIKeyCache creates a new cache for API keys
func NewAPIKeyService ¶
func NewAPIKeyService(apiKeyRepository dataservices.APIKeyRepository, userRepository dataservices.UserService) *apiKeyService
Types ¶
type APIKeyService ¶
type APIKeyService interface { HashRaw(rawKey string) []byte GenerateApiKey(user portainer.User, description string) (string, *portainer.APIKey, error) GetAPIKey(apiKeyID portainer.APIKeyID) (*portainer.APIKey, error) GetAPIKeys(userID portainer.UserID) ([]portainer.APIKey, error) GetDigestUserAndKey(digest []byte) (portainer.User, portainer.APIKey, error) UpdateAPIKey(apiKey *portainer.APIKey) error DeleteAPIKey(apiKeyID portainer.APIKeyID) error InvalidateUserKeyCache(userId portainer.UserID) bool }
APIKeyService represents a service for managing API keys.
Click to show internal directories.
Click to hide internal directories.