database

package
v0.0.0-...-fb7f86c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 18, 2023 License: AGPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ServiceAccountDeletions

func ServiceAccountDeletions(dialect migrator.Dialect) []string

Types

type ServiceAccountsStoreImpl

type ServiceAccountsStoreImpl struct {
	// contains filtered or unexported fields
}

func ProvideServiceAccountsStore

func ProvideServiceAccountsStore(cfg *setting.Cfg, store db.DB, apiKeyService apikey.Service,
	kvStore kvstore.KVStore, userService user.Service, orgService org.Service) *ServiceAccountsStoreImpl

func (*ServiceAccountsStoreImpl) AddServiceAccountToken

func (s *ServiceAccountsStoreImpl) AddServiceAccountToken(ctx context.Context, serviceAccountId int64, cmd *serviceaccounts.AddServiceAccountTokenCommand) (*apikey.APIKey, error)

func (*ServiceAccountsStoreImpl) CreateServiceAccount

CreateServiceAccount creates service account

func (*ServiceAccountsStoreImpl) CreateServiceAccountFromApikey

func (s *ServiceAccountsStoreImpl) CreateServiceAccountFromApikey(ctx context.Context, key *apikey.APIKey) error

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) GetUsageMetrics

func (s *ServiceAccountsStoreImpl) GetUsageMetrics(ctx context.Context) (*serviceaccounts.Stats, error)

func (*ServiceAccountsStoreImpl) ListTokens

func (*ServiceAccountsStoreImpl) MigrateApiKey

func (s *ServiceAccountsStoreImpl) MigrateApiKey(ctx context.Context, orgId int64, keyId int64) error

func (*ServiceAccountsStoreImpl) MigrateApiKeysToServiceAccounts

func (s *ServiceAccountsStoreImpl) MigrateApiKeysToServiceAccounts(ctx context.Context, orgId int64) (*serviceaccounts.MigrationResult, 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 (s *ServiceAccountsStoreImpl) RetrieveServiceAccountIdByName(ctx context.Context, orgId int64, name string) (int64, error)

func (*ServiceAccountsStoreImpl) RevokeServiceAccountToken

func (s *ServiceAccountsStoreImpl) RevokeServiceAccountToken(ctx context.Context, orgId, serviceAccountId, tokenId int64) error

func (*ServiceAccountsStoreImpl) UpdateServiceAccount

func (s *ServiceAccountsStoreImpl) UpdateServiceAccount(
	ctx context.Context,
	orgId, serviceAccountId int64,
	saForm *serviceaccounts.UpdateServiceAccountForm,
) (*serviceaccounts.ServiceAccountProfileDTO, error)

UpdateServiceAccount updates service account

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL