v2

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2023 License: Apache-2.0 Imports: 6 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 (
	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 {
	CreateEnvironment(ctx context.Context, e *domain.Environment) error
	UpdateEnvironment(ctx context.Context, e *domain.Environment) error
	GetEnvironment(ctx context.Context, id string) (*domain.Environment, error)
	GetEnvironmentByNamespace(
		ctx context.Context,
		namespace string,
		deleted bool,
	) (*domain.Environment, error)
	ListEnvironments(
		ctx context.Context,
		whereParts []mysql.WherePart,
		orders []*mysql.Order,
		limit, offset int,
	) ([]*proto.Environment, int, int64, error)
}

func NewEnvironmentStorage

func NewEnvironmentStorage(qe mysql.QueryExecer) EnvironmentStorage

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