manager

package
v0.0.0-...-b197db6 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2024 License: AGPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultProfile

func DefaultProfile() string

func HasProfile

func HasProfile(name string) bool

func Profiles

func Profiles() map[string]Profile

Types

type Manager

type Manager struct {
	ingredient.Base
	// contains filtered or unexported fields
}

Manager manages a profile applied to specific WissKI instances.

func (*Manager) Apply

func (manager *Manager) Apply(ctx context.Context, progress io.Writer, flags Profile) error

Apply applies the given profile to this existing instance. The instance must be running

func (*Manager) Provision

func (manager *Manager) Provision(ctx context.Context, progress io.Writer, system models.System, flags Profile) error

Provision provisions this instance with the given flags.

Provision assumes that the instance does not yet exist, and may fail with an existing instance.

Provision applies defaults to flags, to ensure some values are set

type Profile

type Profile struct {
	// Description is a human-readable description for this profile.
	// It is only used by the frontend.
	Description string

	Drupal string // Version of Drupal to use
	WissKI string // Version of WissKI to use

	InstallModules []string // Modules to be installed (but not neccessarily enabled)
	EnableModules  []string // Modules to be installed and enabled
}

Profile represents a profile applied to a WissKI instance of the Distillery.

func LoadDefaultProfile

func LoadDefaultProfile() Profile

func LoadProfile

func LoadProfile(name string) Profile

func (*Profile) Apply

func (profile *Profile) Apply(other Profile)

Apply copies over defaults from the other profile to this one. If a field is already set, no defaults are copied.

func (*Profile) ApplyDefaults

func (profile *Profile) ApplyDefaults()

ApplyDefaults loads some set of defaults. If all fields are set, no defaults are applied.

Jump to

Keyboard shortcuts

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