mirror of
https://github.com/grafana/grafana.git
synced 2025-02-16 18:34:52 -06:00
* ServiceAccounts: Update service account route * ServiceAccounts: Update service account tests * ServiceAccounts: remove extraneous file
25 lines
1.1 KiB
Go
25 lines
1.1 KiB
Go
package serviceaccounts
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/grafana/grafana/pkg/models"
|
|
)
|
|
|
|
// this should reflect the api
|
|
type Service interface {
|
|
CreateServiceAccount(ctx context.Context, saForm *CreateServiceAccountForm) (*ServiceAccountDTO, error)
|
|
DeleteServiceAccount(ctx context.Context, orgID, serviceAccountID int64) error
|
|
}
|
|
|
|
type Store interface {
|
|
CreateServiceAccount(ctx context.Context, saForm *CreateServiceAccountForm) (*ServiceAccountDTO, error)
|
|
ListServiceAccounts(ctx context.Context, orgID, serviceAccountID int64) ([]*ServiceAccountDTO, error)
|
|
UpdateServiceAccount(ctx context.Context, orgID, serviceAccountID int64, saForm *UpdateServiceAccountForm) (*ServiceAccountDTO, error)
|
|
RetrieveServiceAccount(ctx context.Context, orgID, serviceAccountID int64) (*ServiceAccountProfileDTO, error)
|
|
DeleteServiceAccount(ctx context.Context, orgID, serviceAccountID int64) error
|
|
UpgradeServiceAccounts(ctx context.Context) error
|
|
ConvertToServiceAccounts(ctx context.Context, keys []int64) error
|
|
ListTokens(ctx context.Context, orgID int64, serviceAccount int64) ([]*models.ApiKey, error)
|
|
}
|