Versions in this module Expand all Collapse all v2 v2.6.5 Jun 21, 2023 Changes in this version + func Format(input []byte) []byte + func FormattingDifference(filename string, body []byte) (caddyconfig.Warning, bool) + type Adapter struct + ServerType ServerType + func (a Adapter) Adapt(body []byte, options map[string]any) ([]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) DeleteN(amount int) []Token + func (d *Dispenser) EOFErr() error + func (d *Dispenser) Err(msg string) error + func (d *Dispenser) Errf(format string, args ...any) 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() any + 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 + IsNamedRoute 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]any) (*caddy.Config, []caddyconfig.Warning, error) + type Token struct + File string + Line int + Text string + func Tokenize(input []byte, filename string) ([]Token, error) + func (t Token) NumLineBreaks() int + func (t Token) Quoted() bool + type Unmarshaler interface + UnmarshalCaddyfile func(d *Dispenser) error + func UnmarshalModule(d *Dispenser, moduleID string) (Unmarshaler, error)