Documentation ¶
Index ¶
- Constants
- func ReadSimpleSettings(fs vfs.FileSystem, path string) (map[string]string, error)
- func Register(name string, fac TemplaterFactory, desc string)
- func SplitYamlDocuments(data []byte) ([][]byte, error)
- func Usage(scheme Registry) string
- type GoTemplater
- type MergeTemplater
- type None
- type Options
- func (o *Options) AddFlags(fs *pflag.FlagSet)
- func (o *Options) Complete(fs vfs.FileSystem) error
- func (o *Options) DefaultMode() string
- func (o *Options) Execute(data string) (string, error)
- func (o *Options) FilterSettings(args ...string) []string
- func (o *Options) ParseSettings(fs vfs.FileSystem, paths ...string) error
- func (o *Options) Usage() string
- type Registry
- type Spiff
- type Subst
- type Templater
- type TemplaterFactory
- type TemplaterOptions
- type Values
Constants ¶
View Source
const KIND_TEMPLATER = "templater"
View Source
const SPIFF_MODE = "mode"
Variables ¶
This section is empty.
Functions ¶
func ReadSimpleSettings ¶
func Register ¶
func Register(name string, fac TemplaterFactory, desc string)
func SplitYamlDocuments ¶
Types ¶
type GoTemplater ¶
type GoTemplater struct{}
type MergeTemplater ¶
type MergeTemplater struct{}
type Options ¶
type Options struct { Default string Mode string UseEnv bool Templater Templater Vars Values Options map[string]interface{} }
Options defines the options for cli templating.
func (*Options) DefaultMode ¶
func (*Options) FilterSettings ¶
FilterSettings parses commandline argument variables. it returns all non variable arguments.
func (*Options) ParseSettings ¶
func (o *Options) ParseSettings(fs vfs.FileSystem, paths ...string) error
type Registry ¶
type Registry interface { Register(name string, fac TemplaterFactory, desc string) Create(name string, fs vfs.FileSystem, options ...TemplaterOptions) (Templater, error) Describe(name string) (string, error) KnownTypeNames() []string }
func DefaultRegistry ¶
func DefaultRegistry() Registry
func NewRegistry ¶
func NewRegistry() Registry
type Templater ¶
func NewSpiff ¶
func NewSpiff(fs vfs.FileSystem, opts TemplaterOptions) Templater
type TemplaterFactory ¶
type TemplaterFactory func(system vfs.FileSystem, options TemplaterOptions) Templater
type TemplaterOptions ¶ added in v0.16.0
type TemplaterOptions map[string]interface{}
func (TemplaterOptions) Get ¶ added in v0.16.0
func (t TemplaterOptions) Get(name string) interface{}
type Values ¶
type Values map[string]interface{}
func ReadYAMLSettings ¶
func ReadYAMLSettings(fs vfs.FileSystem, path string) (Values, error)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.