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: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrEnvironmentAlreadyExists          = errors.New("environment: already exists")
	ErrEnvironmentNotFound               = errors.New("environment: not found")
	ErrEnvironmentUnexpectedAffectedRows = errors.New("environment: unexpected affected rows")
)
View Source
var (
	ErrOrganizationAlreadyExists          = errors.New("organization: already exists")
	ErrOrganizationNotFound               = errors.New("organization: not found")
	ErrOrganizationUnexpectedAffectedRows = errors.New("organization: unexpected affected rows")
)
View Source
var (
	ErrProjectAlreadyExists          = errors.New("project: already exists")
	ErrProjectNotFound               = errors.New("project: not found")
	ErrProjectUnexpectedAffectedRows = errors.New("project: unexpected affected rows")
)

Functions

This section is empty.

Types

type EnvironmentStorage

type EnvironmentStorage interface {
	CreateEnvironmentV2(ctx context.Context, e *domain.EnvironmentV2) error
	UpdateEnvironmentV2(ctx context.Context, e *domain.EnvironmentV2) error
	GetEnvironmentV2(ctx context.Context, id string) (*domain.EnvironmentV2, error)
	ListEnvironmentsV2(
		ctx context.Context,
		whereParts []mysql.WherePart,
		orders []*mysql.Order,
		limit, offset int,
	) ([]*proto.EnvironmentV2, int, int64, error)
}

func NewEnvironmentStorage

func NewEnvironmentStorage(qe mysql.QueryExecer) EnvironmentStorage

type OrganizationStorage added in v0.4.0

type OrganizationStorage interface {
	CreateOrganization(ctx context.Context, p *domain.Organization) error
	UpdateOrganization(ctx context.Context, p *domain.Organization) error
	GetOrganization(ctx context.Context, id string) (*domain.Organization, error)
	GetSystemAdminOrganization(ctx context.Context) (*domain.Organization, error)
	ListOrganizations(
		ctx context.Context,
		whereParts []mysql.WherePart,
		orders []*mysql.Order,
		limit, offset int,
	) ([]*proto.Organization, int, int64, error)
}

func NewOrganizationStorage added in v0.4.0

func NewOrganizationStorage(qe mysql.QueryExecer) OrganizationStorage

type ProjectStorage

type ProjectStorage interface {
	CreateProject(ctx context.Context, p *domain.Project) error
	UpdateProject(ctx context.Context, p *domain.Project) error
	GetProject(ctx context.Context, id string) (*domain.Project, error)
	GetTrialProjectByEmail(
		ctx context.Context,
		email string,
		disabled, trial bool,
	) (*domain.Project, error)
	ListProjects(
		ctx context.Context,
		whereParts []mysql.WherePart,
		orders []*mysql.Order,
		limit, offset int,
	) ([]*proto.Project, int, int64, error)
}

func NewProjectStorage

func NewProjectStorage(qe mysql.QueryExecer) ProjectStorage

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