Documentation ¶
Overview ¶
Copyright © 2024 Daniele Rondina <geaaru@macaronios.org> See AUTHORS and LICENSE for the license details and contributors.
Based on the lxd-compose code ¶
Copyright © 2024 Daniele Rondina <geaaru@macaronios.org> See AUTHORS and LICENSE for the license details and contributors.
Based on the lxd-compose code ¶
Copyright © 2024 Daniele Rondina <geaaru@macaronios.org> See AUTHORS and LICENSE for the license details and contributors.
Based on the lxd-compose code ¶
Copyright © 2024 Daniele Rondina <geaaru@macaronios.org> See AUTHORS and LICENSE for the license details and contributors.
Based on the lxd-compose code ¶
Copyright © 2024 Daniele Rondina <geaaru@macaronios.org> See AUTHORS and LICENSE for the license details and contributors.
Based on the lxd-compose code
Index ¶
- func CompileAllProjectFiles(env *specs.SshCEnvironment, pName string, opts CompilerOpts) error
- func CompileGroupFiles(group *specs.SshCGroup, compiler SshCTemplateCompiler, opts CompilerOpts) error
- func CompileNodeFiles(node specs.SshCNode, compiler SshCTemplateCompiler, opts CompilerOpts) error
- func CompileProjectFiles(proj *specs.SshCProject, compiler SshCTemplateCompiler, opts CompilerOpts) error
- type CompilerOpts
- type DefaultCompiler
- type Jinja2Compiler
- type MottainaiCompiler
- type SshCTemplateCompiler
- type Template
- func (tem *Template) AppendValue(k string, v interface{})
- func (tem *Template) Draw(raw string) (string, error)
- func (tem *Template) DrawFromFile(file string) (string, error)
- func (tem *Template) LoadValues(raw string) error
- func (tem *Template) LoadValuesFromFile(file string) error
- func (tem *Template) ReadValues(raw string) (map[string]map[string]interface{}, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CompileAllProjectFiles ¶
func CompileAllProjectFiles(env *specs.SshCEnvironment, pName string, opts CompilerOpts) error
func CompileGroupFiles ¶
func CompileGroupFiles(group *specs.SshCGroup, compiler SshCTemplateCompiler, opts CompilerOpts) error
func CompileNodeFiles ¶
func CompileNodeFiles(node specs.SshCNode, compiler SshCTemplateCompiler, opts CompilerOpts) error
func CompileProjectFiles ¶
func CompileProjectFiles(proj *specs.SshCProject, compiler SshCTemplateCompiler, opts CompilerOpts) error
Types ¶
type CompilerOpts ¶
func (*CompilerOpts) IsGroupEnabled ¶
func (o *CompilerOpts) IsGroupEnabled(g string) bool
type DefaultCompiler ¶
type DefaultCompiler struct { Project *specs.SshCProject Opts []string Vars map[string]interface{} EnvBaseDir string }
func (*DefaultCompiler) GetEnvBaseDir ¶
func (r *DefaultCompiler) GetEnvBaseDir() string
func (*DefaultCompiler) GetVars ¶
func (r *DefaultCompiler) GetVars() *map[string]interface{}
func (*DefaultCompiler) InitVars ¶
func (r *DefaultCompiler) InitVars()
func (*DefaultCompiler) SetEnvBaseDir ¶
func (r *DefaultCompiler) SetEnvBaseDir(dir string)
func (*DefaultCompiler) SetOpts ¶
func (r *DefaultCompiler) SetOpts(o []string)
type Jinja2Compiler ¶
type Jinja2Compiler struct {
*DefaultCompiler
}
func NewJinja2Compiler ¶
func NewJinja2Compiler(proj *specs.SshCProject) *Jinja2Compiler
func (*Jinja2Compiler) Compile ¶
func (r *Jinja2Compiler) Compile(sourceFile, destFile string) error
func (*Jinja2Compiler) CompileRaw ¶
func (r *Jinja2Compiler) CompileRaw(sourceData string) (string, error)
type MottainaiCompiler ¶
type MottainaiCompiler struct {
*DefaultCompiler
}
func NewMottainaiCompiler ¶
func NewMottainaiCompiler(proj *specs.SshCProject) *MottainaiCompiler
func (*MottainaiCompiler) Compile ¶
func (r *MottainaiCompiler) Compile(sourceFile, destFile string) error
func (*MottainaiCompiler) CompileRaw ¶
func (r *MottainaiCompiler) CompileRaw(sourceData string) (string, error)
type SshCTemplateCompiler ¶
type SshCTemplateCompiler interface { InitVars() SetOpts([]string) Compile(sourceFile, destFile string) error CompileRaw(sourceContent string) (string, error) GetEnvBaseDir() string SetEnvBaseDir(string) GetVars() *map[string]interface{} }
func NewProjectTemplateCompiler ¶
func NewProjectTemplateCompiler(env *specs.SshCEnvironment, proj *specs.SshCProject) (SshCTemplateCompiler, error)
type Template ¶
type Template struct {
Values map[string]interface{}
}
func NewTemplate ¶
func NewTemplate() *Template
func (*Template) AppendValue ¶
func (*Template) LoadValues ¶
func (*Template) LoadValuesFromFile ¶
Click to show internal directories.
Click to hide internal directories.