func RegisterFormat(format string, marshaler Marshaler)
type Config struct {
Name string
Opts Opts // NAME_OPTS_*
Values Values
// contains filtered or unexported fields
}
func New(name string) (Config, error)
func (c Config) Write() error
Marshaler serializes the given value and writes it to the writer
type Marshaler interface {
Marshal(io.Writer, interface{}) error
}
type Opts struct {
File string `required:"true"`
Format string `required:"true"`
TemplateFile string `split_words:"true"`
TemplateDeleteKeys []string `split_words:"true"`
Inputs Values // NAME_OPTS_IN_*
}
Unmarshaler deserializes contents of the reader into the provided value pointer. For a value to be mergeable, it must be of type map[string]interface{} or []interface{}.
type Unmarshaler interface {
Unmarshal(io.Reader, interface{}) error
}
type Values map[string]string
func (v Values) Set(value string) error