Documentation
¶
Index ¶
- type Generator
- func (g *Generator) Generate(w io.Writer, data map[string]string) error
- func (g *Generator) GenerateExtended(w io.Writer, result *formats.ParseResult, opts *formats.GenerateOptions) error
- func (g *Generator) GenerateFile(filename string, data map[string]string) error
- func (g *Generator) GenerateString(data map[string]string) (string, error)
- type Handler
- func (h *Handler) Extensions() []string
- func (h *Handler) Format() formats.Format
- func (h *Handler) Generate(w io.Writer, data map[string]string) error
- func (h *Handler) GenerateFile(filename string, data map[string]string) error
- func (h *Handler) GenerateString(data map[string]string) (string, error)
- func (h *Handler) GenerateWithComments(w io.Writer, result *formats.ParseResult, opts *formats.GenerateOptions) error
- func (h *Handler) Parse(r io.Reader) (map[string]string, error)
- func (h *Handler) ParseFile(filename string) (map[string]string, error)
- func (h *Handler) ParseString(content string) (map[string]string, error)
- func (h *Handler) ParseWithComments(r io.Reader) (*formats.ParseResult, error)
- func (h *Handler) Validate(content []byte) error
- func (h *Handler) ValidateKey(key string) error
- func (h *Handler) ValidateValue(_ string) error
- type Parser
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Generator ¶
type Generator struct {
// contains filtered or unexported fields
}
Generator implements ENV format generation
func NewGenerator ¶
NewGenerator creates a new ENV generator
func (*Generator) GenerateExtended ¶
func (g *Generator) GenerateExtended(w io.Writer, result *formats.ParseResult, opts *formats.GenerateOptions) error
GenerateExtended generates with additional options
func (*Generator) GenerateFile ¶
GenerateFile writes ENV format to a file
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler implements the ENV format handler
func NewHandler ¶
NewHandler creates a new ENV handler
func (*Handler) Extensions ¶
Extensions returns supported file extensions
func (*Handler) GenerateFile ¶
GenerateFile implements Generator interface
func (*Handler) GenerateString ¶
GenerateString implements Generator interface
func (*Handler) GenerateWithComments ¶
func (h *Handler) GenerateWithComments(w io.Writer, result *formats.ParseResult, opts *formats.GenerateOptions) error
GenerateWithComments generates ENV content with comments
func (*Handler) ParseString ¶
ParseString implements Parser interface
func (*Handler) ParseWithComments ¶
ParseWithComments parses ENV content preserving comments
func (*Handler) ValidateKey ¶
ValidateKey implements Validator interface
func (*Handler) ValidateValue ¶
ValidateValue implements Validator interface
type Parser ¶
type Parser struct {
// contains filtered or unexported fields
}
Parser implements ENV format parsing
func (*Parser) ParseExtended ¶
ParseExtended parses with additional metadata