ServiceAccount: Update service account api resource and add service account token (#92972)
* Create own legacy store function to list service accounts and update api model * Add service account tokens as a sub resource for service accounts
This commit is contained in:
@@ -14,7 +14,7 @@ import (
|
||||
)
|
||||
|
||||
type FakeServiceAccountStore struct {
|
||||
ExpectedServiceAccountID *serviceaccounts.ServiceAccount
|
||||
ExpectedServiceAccountID int64
|
||||
ExpectedServiceAccountDTO *serviceaccounts.ServiceAccountDTO
|
||||
ExpectedServiceAccountProfileDTO *serviceaccounts.ServiceAccountProfileDTO
|
||||
ExpectedSearchServiceAccountQueryResult *serviceaccounts.SearchOrgServiceAccountsResult
|
||||
@@ -39,7 +39,7 @@ func (f *FakeServiceAccountStore) RetrieveServiceAccount(ctx context.Context, or
|
||||
|
||||
// RetrieveServiceAccountIdByName is a fake retrieving a service account id by name.
|
||||
func (f *FakeServiceAccountStore) RetrieveServiceAccountIdByName(ctx context.Context, orgID int64, name string) (int64, error) {
|
||||
return f.ExpectedServiceAccountID.Id, f.ExpectedError
|
||||
return f.ExpectedServiceAccountID, f.ExpectedError
|
||||
}
|
||||
|
||||
// CreateServiceAccount is a fake creating a service account.
|
||||
|
||||
@@ -52,10 +52,6 @@ type MigrationResult struct {
|
||||
FailedDetails []string `json:"failedDetails"`
|
||||
}
|
||||
|
||||
type ServiceAccount struct {
|
||||
Id int64
|
||||
}
|
||||
|
||||
// swagger:model
|
||||
type CreateServiceAccountForm struct {
|
||||
// example: grafana
|
||||
|
||||
Reference in New Issue
Block a user