Documentation
¶
Index ¶
- Variables
- func ServiceAccountDeletions() []string
- type ServiceAccountsStoreImpl
- func (s *ServiceAccountsStoreImpl) AddServiceAccountToken(ctx context.Context, serviceAccountId int64, ...) error
- func (s *ServiceAccountsStoreImpl) CreateServiceAccount(ctx context.Context, orgId int64, ...) (*serviceaccounts.ServiceAccountDTO, error)
- func (s *ServiceAccountsStoreImpl) CreateServiceAccountFromApikey(ctx context.Context, key *apikey.APIKey) error
- func (s *ServiceAccountsStoreImpl) DeleteServiceAccount(ctx context.Context, orgId, serviceAccountId int64) error
- func (s *ServiceAccountsStoreImpl) DeleteServiceAccountToken(ctx context.Context, orgId, serviceAccountId, tokenId int64) error
- func (s *ServiceAccountsStoreImpl) GetAPIKeysMigrationStatus(ctx context.Context, orgId int64) (status *serviceaccounts.APIKeysMigrationStatus, err error)
- func (s *ServiceAccountsStoreImpl) GetUsageMetrics(ctx context.Context) (*serviceaccounts.Stats, error)
- func (s *ServiceAccountsStoreImpl) HideApiKeysTab(ctx context.Context, orgId int64) error
- func (s *ServiceAccountsStoreImpl) ListTokens(ctx context.Context, query *serviceaccounts.GetSATokensQuery) ([]apikey.APIKey, error)
- func (s *ServiceAccountsStoreImpl) MigrateApiKey(ctx context.Context, orgId int64, keyId int64) error
- func (s *ServiceAccountsStoreImpl) MigrateApiKeysToServiceAccounts(ctx context.Context, orgId int64) error
- func (s *ServiceAccountsStoreImpl) RetrieveServiceAccount(ctx context.Context, orgId, serviceAccountId int64) (*serviceaccounts.ServiceAccountProfileDTO, error)
- func (s *ServiceAccountsStoreImpl) RetrieveServiceAccountIdByName(ctx context.Context, orgId int64, name string) (int64, error)
- func (s *ServiceAccountsStoreImpl) RevertApiKey(ctx context.Context, saId int64, keyId int64) error
- func (s *ServiceAccountsStoreImpl) RevokeServiceAccountToken(ctx context.Context, orgId, serviceAccountId, tokenId int64) error
- func (s *ServiceAccountsStoreImpl) SearchOrgServiceAccounts(ctx context.Context, orgId int64, query string, ...) (*serviceaccounts.SearchServiceAccountsResult, error)
- func (s *ServiceAccountsStoreImpl) UpdateServiceAccount(ctx context.Context, orgId, serviceAccountId int64, ...) (*serviceaccounts.ServiceAccountProfileDTO, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrServiceAccountAlreadyExists = errors.New("service account already exists") ErrServiceAccountTokenNotFound = errors.New("service account token not found") ErrInvalidTokenExpiration = errors.New("invalid SecondsToLive value") ErrDuplicateToken = errors.New("service account token with given name already exists in the organization") ErrServiceAccountAndTokenMismatch = errors.New("API token does not belong to the given service account") )
Functions ¶
func ServiceAccountDeletions ¶
func ServiceAccountDeletions() []string
Types ¶
type ServiceAccountsStoreImpl ¶
type ServiceAccountsStoreImpl struct {
// contains filtered or unexported fields
}
func (*ServiceAccountsStoreImpl) AddServiceAccountToken ¶
func (s *ServiceAccountsStoreImpl) AddServiceAccountToken(ctx context.Context, serviceAccountId int64, cmd *serviceaccounts.AddServiceAccountTokenCommand) error
func (*ServiceAccountsStoreImpl) CreateServiceAccount ¶
func (s *ServiceAccountsStoreImpl) CreateServiceAccount(ctx context.Context, orgId int64, saForm *serviceaccounts.CreateServiceAccountForm) (*serviceaccounts.ServiceAccountDTO, error)
CreateServiceAccount creates service account
func (*ServiceAccountsStoreImpl) CreateServiceAccountFromApikey ¶
func (*ServiceAccountsStoreImpl) DeleteServiceAccount ¶
func (s *ServiceAccountsStoreImpl) DeleteServiceAccount(ctx context.Context, orgId, serviceAccountId int64) error
DeleteServiceAccount deletes service account and all associated tokens
func (*ServiceAccountsStoreImpl) DeleteServiceAccountToken ¶
func (s *ServiceAccountsStoreImpl) DeleteServiceAccountToken(ctx context.Context, orgId, serviceAccountId, tokenId int64) error
func (*ServiceAccountsStoreImpl) GetAPIKeysMigrationStatus ¶
func (s *ServiceAccountsStoreImpl) GetAPIKeysMigrationStatus(ctx context.Context, orgId int64) (status *serviceaccounts.APIKeysMigrationStatus, err error)
func (*ServiceAccountsStoreImpl) GetUsageMetrics ¶
func (s *ServiceAccountsStoreImpl) GetUsageMetrics(ctx context.Context) (*serviceaccounts.Stats, error)
func (*ServiceAccountsStoreImpl) HideApiKeysTab ¶
func (s *ServiceAccountsStoreImpl) HideApiKeysTab(ctx context.Context, orgId int64) error
func (*ServiceAccountsStoreImpl) ListTokens ¶
func (s *ServiceAccountsStoreImpl) ListTokens( ctx context.Context, query *serviceaccounts.GetSATokensQuery, ) ([]apikey.APIKey, error)
func (*ServiceAccountsStoreImpl) MigrateApiKey ¶
func (*ServiceAccountsStoreImpl) MigrateApiKeysToServiceAccounts ¶
func (s *ServiceAccountsStoreImpl) MigrateApiKeysToServiceAccounts(ctx context.Context, orgId int64) error
func (*ServiceAccountsStoreImpl) RetrieveServiceAccount ¶
func (s *ServiceAccountsStoreImpl) RetrieveServiceAccount(ctx context.Context, orgId, serviceAccountId int64) (*serviceaccounts.ServiceAccountProfileDTO, error)
RetrieveServiceAccount returns a service account by its ID
func (*ServiceAccountsStoreImpl) RetrieveServiceAccountIdByName ¶
func (*ServiceAccountsStoreImpl) RevertApiKey ¶
RevertApiKey converts service account token to old API key
func (*ServiceAccountsStoreImpl) RevokeServiceAccountToken ¶
func (s *ServiceAccountsStoreImpl) RevokeServiceAccountToken(ctx context.Context, orgId, serviceAccountId, tokenId int64) error
func (*ServiceAccountsStoreImpl) SearchOrgServiceAccounts ¶
func (s *ServiceAccountsStoreImpl) SearchOrgServiceAccounts( ctx context.Context, orgId int64, query string, filter serviceaccounts.ServiceAccountFilter, page int, limit int, signedInUser *user.SignedInUser, ) (*serviceaccounts.SearchServiceAccountsResult, error)
func (*ServiceAccountsStoreImpl) UpdateServiceAccount ¶
func (s *ServiceAccountsStoreImpl) UpdateServiceAccount(ctx context.Context, orgId, serviceAccountId int64, saForm *serviceaccounts.UpdateServiceAccountForm) (*serviceaccounts.ServiceAccountProfileDTO, error)
UpdateServiceAccount updates service account
Click to show internal directories.
Click to hide internal directories.