Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrGeneratingTemplate = errors.New("failed to execute template")
View Source
var ErrWrongArgumentsProvided = errors.New("number of arguments is invalid")
Functions ¶
Types ¶
type CompletionsSpec ¶
type CompletionsTmplData ¶
type CompletionsTmplData struct { FileHeader FileHeaderTmplData Header string CONFIGFILE string COMPLETIONS_DIR string Completions CompletionsSpec }
func (CompletionsTmplData) Render ¶
func (t CompletionsTmplData) Render() (s string, err error)
type Config ¶
type Config struct { *plugins.Context `yaml:"-"` Vars map[string]string `yaml:"vars,omitempty"` Exports map[string]string `yaml:"exports,omitempty"` Aliases map[string]string `yaml:"aliases,omitempty"` Completions CompletionsSpec `yaml:"completions,omitempty"` }
func CreateConfig ¶
func CreateConfig() *Config
func (*Config) TemplateConfigs ¶
type Export ¶
type Export struct { Key string Value Resolvable }
type FileHeaderTmplData ¶
type FileHeaderTmplData struct {
CONFIGFILE string
}
type Generator ¶
func NewGenerator ¶
type GeneratorConfig ¶
type Option ¶
type Option func(*GeneratorConfig) *GeneratorConfig
type Resolvable ¶
type Resolvable interface { Name() string IsResolved() bool Unresolved() (unresolved []string) Resolve(ctx *ResolveContext) (ok bool) }
type ResolveContext ¶
type ResolveContext struct {
// contains filtered or unexported fields
}
func NewContext ¶
func NewContext(context context.Context) (ctx *ResolveContext)
func (*ResolveContext) Add ¶
func (c *ResolveContext) Add(resolvables ...resolvable)
func (ResolveContext) Env ¶
func (c ResolveContext) Env() (env map[string]string)
func (*ResolveContext) LoadEnvironmentVariables ¶
func (c *ResolveContext) LoadEnvironmentVariables()
func (ResolveContext) ProjectEnv ¶
func (c ResolveContext) ProjectEnv() (env parse.Env)
Click to show internal directories.
Click to hide internal directories.