database

package
v0.0.85-test Latest Latest
Warning

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

Go to latest
Published: May 8, 2023 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ServiceAccountDeletions

func ServiceAccountDeletions() []string

Types

type ErrDuplicateSAToken

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

func (*ErrDuplicateSAToken) Error

func (e *ErrDuplicateSAToken) Error() string

func (*ErrDuplicateSAToken) Unwrap

func (e *ErrDuplicateSAToken) Unwrap() error

type ErrInvalidExpirationSAToken

type ErrInvalidExpirationSAToken struct {
}

func (*ErrInvalidExpirationSAToken) Error

func (*ErrInvalidExpirationSAToken) Unwrap

func (e *ErrInvalidExpirationSAToken) Unwrap() error

type ErrMissingSAToken

type ErrMissingSAToken struct {
}

func (*ErrMissingSAToken) Error

func (e *ErrMissingSAToken) Error() string

func (*ErrMissingSAToken) Unwrap

func (e *ErrMissingSAToken) Unwrap() error

type ErrSAInvalidName

type ErrSAInvalidName struct {
}

func (*ErrSAInvalidName) Error

func (e *ErrSAInvalidName) Error() string

func (*ErrSAInvalidName) Unwrap

func (e *ErrSAInvalidName) Unwrap() error

type ServiceAccountsStoreImpl

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

func NewServiceAccountsStore

func NewServiceAccountsStore(store *sqlstore.SQLStore) *ServiceAccountsStoreImpl

func (*ServiceAccountsStoreImpl) AddServiceAccountToken

func (*ServiceAccountsStoreImpl) ConvertToServiceAccounts

func (s *ServiceAccountsStoreImpl) ConvertToServiceAccounts(ctx context.Context, keys []int64) error

func (*ServiceAccountsStoreImpl) CreateServiceAccount

func (s *ServiceAccountsStoreImpl) CreateServiceAccount(ctx context.Context, orgID int64, name string) (saDTO *serviceaccounts.ServiceAccountDTO, err error)

func (*ServiceAccountsStoreImpl) CreateServiceAccountFromApikey

func (s *ServiceAccountsStoreImpl) CreateServiceAccountFromApikey(ctx context.Context, key *models.ApiKey) error

func (*ServiceAccountsStoreImpl) DeleteServiceAccount

func (s *ServiceAccountsStoreImpl) DeleteServiceAccount(ctx context.Context, orgID, serviceAccountID int64) error

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) (map[string]interface{}, error)

func (*ServiceAccountsStoreImpl) ListTokens

func (s *ServiceAccountsStoreImpl) ListTokens(ctx context.Context, orgID int64, serviceAccountID int64) ([]*models.ApiKey, error)

func (*ServiceAccountsStoreImpl) RetrieveServiceAccount

func (s *ServiceAccountsStoreImpl) RetrieveServiceAccount(ctx context.Context, orgID, serviceAccountID int64) (*serviceaccounts.ServiceAccountProfileDTO, error)

RetrieveServiceAccountByID returns a service account by its ID

func (*ServiceAccountsStoreImpl) SearchOrgServiceAccounts

func (s *ServiceAccountsStoreImpl) SearchOrgServiceAccounts(
	ctx context.Context, orgID int64, query string, filter serviceaccounts.ServiceAccountFilter, page int, limit int,
	signedInUser *models.SignedInUser,
) (*serviceaccounts.SearchServiceAccountsResult, error)

func (*ServiceAccountsStoreImpl) UpdateServiceAccount

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

func (*ServiceAccountsStoreImpl) UpgradeServiceAccounts

func (s *ServiceAccountsStoreImpl) UpgradeServiceAccounts(ctx context.Context) error

Jump to

Keyboard shortcuts

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