Documentation
¶
Index ¶
- func RehashSingle(ctx context.Context, profileName string) error
- type Configurable
- type Generator
- type Pluggable
- type Profile
- func (p Profile) Exists() bool
- func (p Profile) GenerateShellLoadFile(ctx context.Context) error
- func (p *Profile) LoadConfig() error
- func (p *Profile) LoadPluginConfigurations(ctx context.Context) error
- func (p Profile) LoadPlugins()
- func (p *Profile) RunPluginGeneration(ctx context.Context) error
- func (p Profile) SetupPlugins(ctx context.Context) error
- type ProfileConfig
- type Renderable
- type Setuppable
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Configurable ¶
type Configurable interface {
Config() interface{}
ConfigFile(profileLocation string) string
LoadConfig(profileLocation string) error
}
Configurable interface allow a plugin to load configuration from the profile folder
type Pluggable ¶
type Pluggable interface {
Name() string
Renderable
}
Pluggable interface allow a plugin to be "plugged" in a profile. Is the common interface implemented by all plugins
type Profile ¶
type Profile struct {
// Name of the profile
Name string
// Location of the profile
Location string
// Plugins contains a map of Pluggable
Plugins map[string]Pluggable
// Shell is the shell to be used by profile
Shell string
// Config contains profile specific configurations
Config ProfileConfig
// RunLoaderPath is the path to be used for the profile run script
RunLoaderPath string
// ShellLoaderPath is the path to be used for the profile load script
ShellLoaderPath string
}
Profile holds information for a single profile
func (Profile) Exists ¶
Exists return where the profile exists Profile existance is determinated by profile Location existance
func (Profile) GenerateShellLoadFile ¶
GenerateShellLoadFile generate profile shell loader file
func (*Profile) LoadConfig ¶
func (*Profile) LoadPluginConfigurations ¶
LoadPluginConfigurations load each Configurable plugin configuration
func (*Profile) RunPluginGeneration ¶
RunPluginGeneration run each Generator plugin generation
type ProfileConfig ¶
type ProfileConfig struct {
Plugins []string
}
func (*ProfileConfig) LoadFromFile ¶
func (pc *ProfileConfig) LoadFromFile(path string) error
type Renderable ¶
Renderable interface allow a plugin to render content in the shell loader and runner files
type Setuppable ¶
Setuppable interface allow a plugin to perform setup steps before rendering