services

package
v1.13.0 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2026 License: Apache-2.0 Imports: 12 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 interface {
	Create(ctx context.Context, actor *models.Actor, req types.CreateApiKeyRequest) (*types.CreateApiKeyResponse, error)
	GetByID(ctx context.Context, actor *models.Actor, id string) (*types.ApiKey, error)
	GetAll(ctx context.Context, actor *models.Actor, req types.GetApiKeysRequest) (*types.GetAllApiKeysResponse, error)
	Update(ctx context.Context, actor *models.Actor, id string, req types.UpdateApiKeyData) (*types.ApiKey, error)
	Delete(ctx context.Context, actor *models.Actor, id string) error
	RecordLastRequest(ctx context.Context, id string, timestamp time.Time) (*types.ApiKey, error)
	DeleteExpired(ctx context.Context) error
	DeleteAllByOwner(ctx context.Context, actor *models.Actor, ownerType string, ownerID string) error
	Verify(ctx context.Context, req types.VerifyApiKeyRequest) (*types.VerifyApiKeyResult, error)
	ValidatePermissionKeys(ctx context.Context, permissionKeys []string) error
}

func NewApiKeyService

func NewApiKeyService(
	pluginConfig types.ApiKeyPluginConfig,
	userService rootservices.UserService,
	tokenService rootservices.TokenService,
	accessControlService rootservices.AccessControlService,
	rateLimiterService rootservices.RateLimiterService,
	organizationService rootservices.OrganizationService,
	authorizer rootservices.Authorizer,
	apiKeyRepo repositories.ApiKeyRepository,
) ApiKeyService

Jump to

Keyboard shortcuts

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