v2

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Feb 29, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrAccountAlreadyExists          = errors.New("account: account already exists")
	ErrAccountNotFound               = errors.New("account: account not found")
	ErrAccountUnexpectedAffectedRows = errors.New("account: account unexpected affected rows")
)
View Source
var (
	ErrAPIKeyAlreadyExists          = errors.New("apiKey: api key already exists")
	ErrAPIKeyNotFound               = errors.New("apiKey: api key not found")
	ErrAPIKeyUnexpectedAffectedRows = errors.New("apiKey: api key unexpected affected rows")
)
View Source
var (
	ErrSystemAdminAccountNotFound = errors.New("account: admin account not found")
)

Functions

This section is empty.

Types

type AccountStorage

type AccountStorage interface {
	RunInTransaction(ctx context.Context, f func() error) error
	CreateAccountV2(ctx context.Context, a *domain.AccountV2) error
	UpdateAccountV2(ctx context.Context, a *domain.AccountV2) error
	DeleteAccountV2(ctx context.Context, a *domain.AccountV2) error
	GetAccountV2(ctx context.Context, email, organizationID string) (*domain.AccountV2, error)
	GetAccountV2ByEnvironmentID(ctx context.Context, email, environmentID string) (*domain.AccountV2, error)
	GetAccountsWithOrganization(ctx context.Context, email string) ([]*domain.AccountWithOrganization, error)
	ListAccountsV2(
		ctx context.Context,
		whereParts []mysql.WherePart,
		orders []*mysql.Order,
		limit, offset int,
	) ([]*proto.AccountV2, int, int64, error)
	GetSystemAdminAccountV2(ctx context.Context, email string) (*domain.AccountV2, error)
	CreateAPIKey(ctx context.Context, k *domain.APIKey, environmentNamespace string) error
	UpdateAPIKey(ctx context.Context, k *domain.APIKey, environmentNamespace string) error
	GetAPIKey(ctx context.Context, id, environmentNamespace string) (*domain.APIKey, error)
	ListAPIKeys(
		ctx context.Context,
		whereParts []mysql.WherePart,
		orders []*mysql.Order,
		limit, offset int,
	) ([]*proto.APIKey, int, int64, error)
}

func NewAccountStorage

func NewAccountStorage(client mysql.Client) AccountStorage

Directories

Path Synopsis
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.

Jump to

Keyboard shortcuts

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