Documentation
¶
Index ¶
- func Routes(api *API) []models.Route
- type API
- func (a *API) Create(ctx context.Context, actor *models.Actor, req types.CreateApiKeyRequest) (*types.CreateApiKeyResponse, error)
- func (a *API) Delete(ctx context.Context, actor *models.Actor, id string) error
- func (a *API) DeleteAllByOwner(ctx context.Context, actor *models.Actor, ownerType string, ownerID string) error
- func (a *API) DeleteExpired(ctx context.Context) error
- func (a *API) GetAll(ctx context.Context, actor *models.Actor, req types.GetApiKeysRequest) (*types.GetAllApiKeysResponse, error)
- func (a *API) GetByID(ctx context.Context, actor *models.Actor, id string) (*types.ApiKey, error)
- func (a *API) RecordLastRequest(ctx context.Context, id string, timestamp time.Time) (*types.ApiKey, error)
- func (a *API) Update(ctx context.Context, actor *models.Actor, id string, ...) (*types.ApiKey, error)
- func (a *API) Verify(ctx context.Context, req types.VerifyApiKeyRequest) (*types.VerifyApiKeyResult, error)
- type ApiKeyPlugin
- func (p *ApiKeyPlugin) Close() error
- func (p *ApiKeyPlugin) Config() any
- func (p *ApiKeyPlugin) DependsOn() []string
- func (p *ApiKeyPlugin) Hooks() []models.Hook
- func (p *ApiKeyPlugin) Init(ctx *models.PluginContext) error
- func (p *ApiKeyPlugin) Metadata() models.PluginMetadata
- func (p *ApiKeyPlugin) Migrations(provider string) []migrations.Migration
- func (p *ApiKeyPlugin) Routes() []models.Route
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type API ¶
type API struct {
// contains filtered or unexported fields
}
func NewAPI ¶
func NewAPI(service apiservices.ApiKeyService) *API
func (*API) Create ¶
func (a *API) Create(ctx context.Context, actor *models.Actor, req types.CreateApiKeyRequest) (*types.CreateApiKeyResponse, error)
func (*API) DeleteAllByOwner ¶
func (*API) GetAll ¶
func (a *API) GetAll(ctx context.Context, actor *models.Actor, req types.GetApiKeysRequest) (*types.GetAllApiKeysResponse, error)
func (*API) RecordLastRequest ¶
func (*API) Verify ¶
func (a *API) Verify(ctx context.Context, req types.VerifyApiKeyRequest) (*types.VerifyApiKeyResult, error)
type ApiKeyPlugin ¶
type ApiKeyPlugin struct {
Api *API
// contains filtered or unexported fields
}
func New ¶
func New(config types.ApiKeyPluginConfig) *ApiKeyPlugin
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
Click to show internal directories.
Click to hide internal directories.