grafana/pkg/services/apikey/apikey.go
ying-jeanne ebcdf402b2
Chore: move from xorm to sqlx apikey store (#53434)
* migrate from xorm to sqlx

* fix tests

* fix comments

* fix some comments on the PR

* fix CI

* fix the comments
2022-08-23 11:01:35 -04:00

17 lines
579 B
Go

package apikey
import (
"context"
)
type Service interface {
GetAPIKeys(ctx context.Context, query *GetApiKeysQuery) error
GetAllAPIKeys(ctx context.Context, orgID int64) ([]*APIKey, error)
DeleteApiKey(ctx context.Context, cmd *DeleteCommand) error
AddAPIKey(ctx context.Context, cmd *AddCommand) error
GetApiKeyById(ctx context.Context, query *GetByIDQuery) error
GetApiKeyByName(ctx context.Context, query *GetByNameQuery) error
GetAPIKeyByHash(ctx context.Context, hash string) (*APIKey, error)
UpdateAPIKeyLastUsedDate(ctx context.Context, tokenID int64) error
}