Versions in this module Expand all Collapse all v2 v2.5.2 Jun 8, 2022 Changes in this version + func Format(input []byte) []byte + type Adapter struct + ServerType ServerType + func (a Adapter) Adapt(body []byte, options map[string]interface{}) ([]byte, []caddyconfig.Warning, error) + type Dispenser struct + func NewDispenser(tokens []Token) *Dispenser + func NewTestDispenser(input string) *Dispenser + func (d *Dispenser) AllArgs(targets ...*string) bool + func (d *Dispenser) ArgErr() error + func (d *Dispenser) Args(targets ...*string) bool + func (d *Dispenser) CountRemainingArgs() int + func (d *Dispenser) Delete() []Token + func (d *Dispenser) EOFErr() error + func (d *Dispenser) Err(msg string) error + func (d *Dispenser) Errf(format string, args ...interface{}) error + func (d *Dispenser) File() string + func (d *Dispenser) Line() int + func (d *Dispenser) Nesting() int + func (d *Dispenser) NewFromNextSegment() *Dispenser + func (d *Dispenser) Next() bool + func (d *Dispenser) NextArg() bool + func (d *Dispenser) NextBlock(initialNestingLevel int) bool + func (d *Dispenser) NextLine() bool + func (d *Dispenser) NextSegment() Segment + func (d *Dispenser) Prev() bool + func (d *Dispenser) RemainingArgs() []string + func (d *Dispenser) RemainingArgsRaw() []string + func (d *Dispenser) Reset() + func (d *Dispenser) ScalarVal() interface{} + func (d *Dispenser) SyntaxErr(expected string) error + func (d *Dispenser) Token() Token + func (d *Dispenser) Val() string + func (d *Dispenser) ValRaw() string + func (d *Dispenser) WrapErr(err error) error + type Segment []Token + func (s Segment) Directive() string + type ServerBlock struct + HasBraces bool + Keys []string + Segments []Segment + func Parse(filename string, input []byte) ([]ServerBlock, error) + func (sb ServerBlock) DispenseDirective(dir string) *Dispenser + type ServerType interface + Setup func([]ServerBlock, map[string]interface{}) (*caddy.Config, []caddyconfig.Warning, error) + type Token struct + File string + Line int + Text string + func Tokenize(input []byte, filename string) ([]Token, error) + type Unmarshaler interface + UnmarshalCaddyfile func(d *Dispenser) error + func UnmarshalModule(d *Dispenser, moduleID string) (Unmarshaler, error)