keys

package
v0.0.0-...-89c2312 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrKeyNotFound         = errors.New("key not found")
	ErrKeyNameInUseForUser = errors.New("key name already in use for user")
	ErrApiKeyNotFound      = errors.New("api key not found")
)

Functions

This section is empty.

Types

type Keys

type Keys interface {
	CreateApiKeyForUser(userUUID string, name string) (string, error)
	ListAllApiKeysForUser(userUUID string) ([]string, error) // only returns key names, not values
	DeleteApiKeyForUser(userUUID string, name string) error
	GetApiKeyForUser(userUUID string, name string) (string, error)
	UpdateApiKeyForUser(userUUID string, name string, newName string) error
	GetUserFromApiKey(apiKey string) (*models.User, error)
}

func New

func New(
	logger *slog.Logger,
	userController users.Users,
) Keys

Jump to

Keyboard shortcuts

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