state

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2021 License: MPL-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type State

type State interface {
	// Migrate runs DB migrations to prepare all tables for the server to work with
	Migrate(context.Context) error

	CheckEnvExists(context.Context, string) (bool, error)
	CreateEnvironment(context.Context, *environment.Environment) error
	UpdateEnvStatus(context.Context, string, string) error
	ListEnvironments(context.Context) ([]string, error)
	Environment(context.Context, string) (*environment.Environment, error)
	DeleteEnvironment(context.Context, string) error
	// CheckEnvContainsApps returns true if the given environment contains even a single application
	CheckEnvContainsApps(context.Context, string) (bool, error)

	Deployment(context.Context, string) (*deployment.Deployment, error)
	ListDeployments(context.Context, string) ([]*deployment.Deployment, error)
	CreateDeployment(context.Context, *deployment.Deployment) (int64, error)
	UpdateDeploymentStatus(context.Context, string, string) error

	//CheckAppExists(context.Context, string, string) (bool, error)
	CreateApp(context.Context, *application.Application, string) error
	UpdateApp(context.Context, *application.Application, string) error
	App(context.Context, string, string) (*application.Application, error)
	DeleteApp(context.Context, string, string) error

	AddDomain(context.Context, *domain.Domain) error
	CheckDomainExists(context.Context, string) (bool, error)
	DeleteDomain(context.Context, string) error
	ListDomains(context.Context) ([]string, error)
}

State manages all structured data persisted on disk for Cloudfauj Server

func New

func New(l *logrus.Logger, db *sql.DB) State

Jump to

Keyboard shortcuts

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