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
Click to show internal directories.
Click to hide internal directories.