handler

package
v0.6.4 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CfgValidationHandler

type CfgValidationHandler interface {
	ValidateBase(cType string, cTypeOpt module.ConfigTypeOptions, dataType module.DataType) error
	ValidateTypeOptions(cType string, cTypeOpt module.ConfigTypeOptions) error
	ValidateValue(cType string, cTypeOpt module.ConfigTypeOptions, value any, isSlice bool, dataType module.DataType) error
	ValidateValInOpt(cOpt any, value any, isSlice bool, dataType module.DataType) error
}

type DepHealthHandler

type DepHealthHandler interface {
	List(ctx context.Context, instances map[string]model.DepInstance) (map[string]model.DepHealthInfo, error)
	Get(ctx context.Context, instance model.DepInstance) (model.DepHealthInfo, error)
}

type DepStorageHandler

type DepStorageHandler interface {
	BeginTransaction(ctx context.Context) (driver.Tx, error)
	ListDep(ctx context.Context, filter model.DepFilter) ([]model.DepBase, error)
	CreateDep(ctx context.Context, tx driver.Tx, depBase model.DepBase) (string, error)
	CreateDepAssets(ctx context.Context, tx driver.Tx, dID string, depAssets model.DepAssets) error
	ReadDep(ctx context.Context, dID string, assets bool) (model.Deployment, error)
	UpdateDep(ctx context.Context, tx driver.Tx, depBase model.DepBase) error
	DeleteDep(ctx context.Context, dID string) error
	DeleteDepAssets(ctx context.Context, itf driver.Tx, dID string) error
	ListInst(ctx context.Context, filter model.DepInstFilter) ([]model.Instance, error)
	CreateInst(ctx context.Context, tx driver.Tx, dID string, timestamp time.Time) (string, error)
	ReadInst(ctx context.Context, iID string) (model.Instance, error)
	DeleteInst(ctx context.Context, iID string) error
	ListInstCtr(ctx context.Context, iID string, filter model.CtrFilter) ([]model.Container, error)
	CreateInstCtr(ctx context.Context, tx driver.Tx, iID string, ctr model.Container) error
}

type DeploymentHandler

type DeploymentHandler interface {
	List(ctx context.Context, filter model.DepFilter) ([]model.DepBase, error)
	Get(ctx context.Context, dID string, assets, instance bool) (model.Deployment, error)
	Create(ctx context.Context, mod *module.Module, depReq model.DepInput, incl dir_fs.DirFS, indirect bool) (string, error)
	Delete(ctx context.Context, dID string, orphans bool) error
	Update(ctx context.Context, dID string, mod *module.Module, depReq model.DepInput, incl dir_fs.DirFS) error
	Enable(ctx context.Context, dID string, dependencies bool) error
	Disable(ctx context.Context, dID string, dependencies bool) error
	Start(ctx context.Context, dID string) error
}

type JobHandler

type JobHandler interface {
	List(filter model.JobFilter) []model.Job
	Get(id string) (model.Job, error)
	Create(desc string, tFunc func(context.Context, context.CancelFunc) error) (string, error)
	Cancel(id string) error
}

type ModFileHandler

type ModFileHandler interface {
	GetModule(file fs.File) (*module.Module, error)
	GetModFile(dir dir_fs.DirFS) (fs.File, string, error)
}

type ModRepo

type ModRepo interface {
	Versions() []string
	Get(ver string) (dir_fs.DirFS, error)
	Remove() error
}

type ModStagingHandler

type ModStagingHandler interface {
	Prepare(ctx context.Context, modules map[string]*module.Module, mID, ver string) (Stage, error)
}

type ModStorageHandler

type ModStorageHandler interface {
	List(ctx context.Context, filter model.ModFilter) ([]model.Module, error)
	Get(ctx context.Context, mID string) (model.Module, error)
	GetDir(ctx context.Context, mID string) (dir_fs.DirFS, error)
	Add(ctx context.Context, mod model.Module, modDir dir_fs.DirFS, modFile string) error
	Update(ctx context.Context, mod model.Module, modDir dir_fs.DirFS, modFile string) error
	Delete(ctx context.Context, mID string) error
}

type ModTransferHandler

type ModTransferHandler interface {
	Get(ctx context.Context, mID string) (ModRepo, error)
}

type ModUpdateHandler

type ModUpdateHandler interface {
	Check(ctx context.Context, modules map[string]*module.Module) error
	List(ctx context.Context) map[string]model.ModUpdate
	Get(ctx context.Context, mID string) (model.ModUpdate, error)
	Remove(ctx context.Context, mID string) error
	Prepare(ctx context.Context, modules map[string]*module.Module, stage Stage, mID string) error
	GetPending(ctx context.Context, mID string) (Stage, map[string]struct{}, map[string]struct{}, map[string]struct{}, error)
	CancelPending(ctx context.Context, mID string) error
}

type ModuleHandler

type ModuleHandler interface {
	List(ctx context.Context, filter model.ModFilter) ([]model.Module, error)
	Get(ctx context.Context, mID string) (model.Module, error)
	GetReq(ctx context.Context, mID string) (model.Module, map[string]model.Module, error)
	GetDir(ctx context.Context, mID string) (dir_fs.DirFS, error)
	Add(ctx context.Context, mod *module.Module, modDir dir_fs.DirFS, modFile string, indirect bool) error
	Update(ctx context.Context, mod *module.Module, modDir dir_fs.DirFS, modFile string, indirect bool) error
	Delete(ctx context.Context, mID string, force bool) error
}

type Stage

type Stage interface {
	Items() map[string]StageItem
	Get(mID string) (StageItem, bool)
	Remove() error
}

type StageItem

type StageItem interface {
	Module() *module.Module
	ModFile() string
	Dir() dir_fs.DirFS
	Indirect() bool
}

type Validator

type Validator func(params map[string]any) error

Jump to

Keyboard shortcuts

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