Versions in this module Expand all Collapse all v1 v1.0.4 Sep 29, 2024 Changes in this version + const MatcherNameCtxKey + func Format(input []byte) []byte + func FormattingDifference(filename string, body []byte) (kengineconfig.Warning, bool) + type Adapter struct + ServerType ServerType + func (a Adapter) Adapt(body []byte, options map[string]any) ([]byte, []kengineconfig.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) GetContext(key string) any + func (d *Dispenser) GetContextString(key string) 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) SetContext(key string, value 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 []Token + Segments []Segment + func Parse(filename string, input []byte) ([]ServerBlock, error) + func (sb ServerBlock) DispenseDirective(dir string) *Dispenser + func (sb ServerBlock) GetKeysText() []string + type ServerType interface + Setup func([]ServerBlock, map[string]any) (*kengine.Config, []kengineconfig.Warning, error) + type Token struct + File string + Line int + Text string + func Tokenize(input []byte, filename string) ([]Token, error) + func (t Token) Clone() Token + func (t Token) NumLineBreaks() int + func (t Token) Quoted() bool + type Unmarshaler interface + UnmarshalKenginefile func(d *Dispenser) error + func UnmarshalModule(d *Dispenser, moduleID string) (Unmarshaler, error) Other modules containing this package github.com/khulnasoft/kengine/v2