apikey

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: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Routes

func Routes(api *API) []models.Route

Types

type API

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

func NewAPI

func NewAPI(service apiservices.ApiKeyService) *API

func (*API) Create

func (*API) Delete

func (a *API) Delete(ctx context.Context, actor *models.Actor, id string) error

func (*API) DeleteAllByOwner

func (a *API) DeleteAllByOwner(ctx context.Context, actor *models.Actor, ownerType string, ownerID string) error

func (*API) DeleteExpired

func (a *API) DeleteExpired(ctx context.Context) error

func (*API) GetAll

func (*API) GetByID

func (a *API) GetByID(ctx context.Context, actor *models.Actor, id string) (*types.ApiKey, error)

func (*API) RecordLastRequest

func (a *API) RecordLastRequest(ctx context.Context, id string, timestamp time.Time) (*types.ApiKey, error)

func (*API) Update

func (a *API) Update(ctx context.Context, actor *models.Actor, id string, req types.UpdateApiKeyData) (*types.ApiKey, error)

func (*API) Verify

type ApiKeyPlugin

type ApiKeyPlugin struct {
	Api *API
	// contains filtered or unexported fields
}

func New

func (*ApiKeyPlugin) Close

func (p *ApiKeyPlugin) Close() error

func (*ApiKeyPlugin) Config

func (p *ApiKeyPlugin) Config() any

func (*ApiKeyPlugin) DependsOn

func (p *ApiKeyPlugin) DependsOn() []string

func (*ApiKeyPlugin) Hooks

func (p *ApiKeyPlugin) Hooks() []models.Hook

func (*ApiKeyPlugin) Init

func (p *ApiKeyPlugin) Init(ctx *models.PluginContext) error

func (*ApiKeyPlugin) Metadata

func (p *ApiKeyPlugin) Metadata() models.PluginMetadata

func (*ApiKeyPlugin) Migrations

func (p *ApiKeyPlugin) Migrations(provider string) []migrations.Migration

func (*ApiKeyPlugin) Routes

func (p *ApiKeyPlugin) Routes() []models.Route

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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