Documentation ¶
Index ¶
- Variables
- type BasicContext
- func (b BasicContext) Bytes() []byte
- func (b BasicContext) Dump(dumper dumper.Dumper) error
- func (b BasicContext) GetChild(index int) (Parser, error)
- func (b BasicContext) GetIndention() parser_indention.Indention
- func (b BasicContext) GetPosition() string
- func (b BasicContext) GetType() parser_type.ParserType
- func (b BasicContext) GetValue() string
- func (b *BasicContext) Insert(parser Parser, index int) error
- func (b BasicContext) Len() int
- func (b BasicContext) Match(words KeyWords) bool
- func (b *BasicContext) Modify(parser Parser, index int) error
- func (b *BasicContext) Query(words KeyWords) (Context, int)
- func (b *BasicContext) QueryAll(words KeyWords) map[Context][]int
- func (b *BasicContext) Remove(index int) error
- func (b BasicContext) SetGlobalDeep(deep int)
- type Comment
- func (c Comment) Bytes() []byte
- func (c Comment) Dump(dumper dumper.Dumper) error
- func (c Comment) GetIndention() parser_indention.Indention
- func (c *Comment) GetPosition() string
- func (c Comment) GetType() parser_type.ParserType
- func (c Comment) GetValue() string
- func (c *Comment) Match(words KeyWords) bool
- func (c *Comment) SetGlobalDeep(deep int)
- type Config
- type Context
- type Events
- type Geo
- type Http
- type If
- type Include
- type Key
- func (k Key) Bytes() []byte
- func (k Key) Dump(dumper dumper.Dumper) error
- func (k Key) GetIndention() parser_indention.Indention
- func (k Key) GetPosition() string
- func (k Key) GetType() parser_type.ParserType
- func (k Key) GetValue() string
- func (k *Key) Match(words KeyWords) bool
- func (k *Key) SetGlobalDeep(deep int)
- type KeyWords
- type LimitExcept
- type Map
- type Parser
- type Server
- type Stream
- type Types
- type Upstream
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type BasicContext ¶
type BasicContext struct { Name parser_type.ParserType `json:"-"` Value string `json:"value,omitempty"` Children []Parser `json:"param,omitempty"` Position parser_position.ParserPosition // contains filtered or unexported fields }
func (BasicContext) Bytes ¶
func (b BasicContext) Bytes() []byte
func (BasicContext) GetIndention ¶
func (b BasicContext) GetIndention() parser_indention.Indention
func (BasicContext) GetPosition ¶
func (b BasicContext) GetPosition() string
func (BasicContext) GetType ¶
func (b BasicContext) GetType() parser_type.ParserType
func (BasicContext) GetValue ¶
func (b BasicContext) GetValue() string
func (BasicContext) Len ¶
func (b BasicContext) Len() int
func (BasicContext) Match ¶
func (b BasicContext) Match(words KeyWords) bool
func (*BasicContext) Remove ¶
func (b *BasicContext) Remove(index int) error
func (BasicContext) SetGlobalDeep ¶
func (b BasicContext) SetGlobalDeep(deep int)
type Comment ¶
type Comment struct { Comments string `json:"comments"` Inline bool `json:"inline"` // contains filtered or unexported fields }
func (Comment) GetIndention ¶
func (c Comment) GetIndention() parser_indention.Indention
func (*Comment) GetPosition ¶
func (Comment) GetType ¶
func (c Comment) GetType() parser_type.ParserType
func (*Comment) SetGlobalDeep ¶
type Config ¶
type Config struct {
BasicContext `json:"config"`
}
type Context ¶
type Context interface { Parser Insert(parser Parser, index int) error Remove(index int) error Modify(parser Parser, index int) error Query(words KeyWords) (Context, int) QueryAll(words KeyWords) map[Context][]int GetChild(index int) (Parser, error) Len() int }
func NewContext ¶
func NewContext(value string, parserType parser_type.ParserType, indention parser_indention.Indention) Context
type Events ¶
type Events struct {
BasicContext `json:"events"`
}
type Geo ¶
type Geo struct {
BasicContext `json:"geo"`
}
type Http ¶
type Http struct {
BasicContext `json:"http"`
}
type If ¶
type If struct {
BasicContext `json:"if"`
}
type Include ¶
type Include struct {
BasicContext `json:"include"`
}
type Key ¶
type Key struct { Name string `json:"name"` Value string `json:"value"` // contains filtered or unexported fields }
func (Key) GetIndention ¶
func (k Key) GetIndention() parser_indention.Indention
func (Key) GetPosition ¶
func (Key) GetType ¶
func (k Key) GetType() parser_type.ParserType
func (*Key) SetGlobalDeep ¶
type KeyWords ¶
func NewKeyWords ¶
func NewKeyWords(pType parser_type.ParserType, isReg bool, value ...string) (KeyWords, error)
type LimitExcept ¶
type LimitExcept struct {
BasicContext `json:"limit_except"`
}
type Map ¶
type Map struct {
BasicContext `json:"map"`
}
type Parser ¶
type Parser interface { Bytes() []byte Dump(dumper dumper.Dumper) error GetType() parser_type.ParserType // key.GetValue: // return key's name and key's value GetValue() string GetIndention() parser_indention.Indention SetGlobalDeep(int) GetPosition() string Match(words KeyWords) bool // contains filtered or unexported methods }
func NewComment ¶
func NewComment(comments string, inline bool, indention parser_indention.Indention) Parser
type Server ¶
type Server struct {
BasicContext `json:"server"`
}
type Stream ¶
type Stream struct {
BasicContext `json:"stream"`
}
type Types ¶
type Types struct {
BasicContext `json:"types"`
}
type Upstream ¶
type Upstream struct {
BasicContext `json:"upstream"`
}
Click to show internal directories.
Click to hide internal directories.