mirror of
https://github.com/grafana/grafana.git
synced 2025-02-15 01:53:33 -06:00
* migrate from xorm to sqlx * fix tests * fix comments * fix some comments on the PR * fix CI * fix the comments
19 lines
681 B
Go
19 lines
681 B
Go
package apikeyimpl
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/grafana/grafana/pkg/services/apikey"
|
|
)
|
|
|
|
type store interface {
|
|
GetAPIKeys(ctx context.Context, query *apikey.GetApiKeysQuery) error
|
|
GetAllAPIKeys(ctx context.Context, orgID int64) ([]*apikey.APIKey, error)
|
|
DeleteApiKey(ctx context.Context, cmd *apikey.DeleteCommand) error
|
|
AddAPIKey(ctx context.Context, cmd *apikey.AddCommand) error
|
|
GetApiKeyById(ctx context.Context, query *apikey.GetByIDQuery) error
|
|
GetApiKeyByName(ctx context.Context, query *apikey.GetByNameQuery) error
|
|
GetAPIKeyByHash(ctx context.Context, hash string) (*apikey.APIKey, error)
|
|
UpdateAPIKeyLastUsedDate(ctx context.Context, tokenID int64) error
|
|
}
|