Documentation ¶
Overview ¶
json 包,该包包含了用于resolve包中nginx配置对象json反序列化的相关对象和方法及函数 创建者: ClessLi 创建时间: 2020-4-13 09:37:01
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( RegEventsHead = regexp.MustCompile(`^\s*{\s*"events"\s*:\s*{`) RegHttpHead = regexp.MustCompile(`^\s*{\s*"http"\s*:\s*{`) RegStreamHead = regexp.MustCompile(`^\s*{\s*"stream"\s*:\s*{`) RegServerHead = regexp.MustCompile(`^\s*{\s*"server"\s*:\s*{`) RegLocationHead = regexp.MustCompile(`^\s*{\s*"location"\s*:\s*{`) RegIfHead = regexp.MustCompile(`^\s*{\s*"if"\s*:\s*{`) RegUpstreamHead = regexp.MustCompile(`^\s*{\s*"upstream"\s*:\s*{`) RegGeoHead = regexp.MustCompile(`^\s*{\s*"geo"\s*:\s*{`) RegMapHead = regexp.MustCompile(`^\s*{\s*"map"\s*:\s*{`) RegLimitExceptHead = regexp.MustCompile(`^\s*{\s*"limit_except"\s*:\s*{`) RegTypesHead = regexp.MustCompile(`^\s*{\s*"types"\s*:\s*{`) RegIncludeHead = regexp.MustCompile(`^\s*{\s*"include"\s*:\s*{`) RegConfigHead = regexp.MustCompile(`^\s*{\s*"config"\s*:\s*{`) RegCommentHead = regexp.MustCompile(`^\s*{\s*"comments"\s*:\s*"`) )
Functions ¶
Types ¶
type BasicContext ¶
type BasicContext struct { Name string `json:"-"` Value string `json:"value,omitempty"` Children []*json.RawMessage `json:"param,omitempty"` }
BasicContext, 用于json反序列化的上下文基础对象,定义了上下文类型的基本属性及基础方法
type Config ¶
type Config struct {
BasicContext `json:"config"`
}
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"` Key *Key `json:"tags"` Comment *Comment `json:"comments"` ConfPWD string `json:"conf_pwd"` }
type LimitExcept ¶
type LimitExcept struct {
BasicContext `json:"limit_except"`
}
func (*LimitExcept) UnmarshalToJSON ¶
type Location ¶
type Location struct {
BasicContext `json:"location"`
}
type Map ¶
type Map struct {
BasicContext `json:"map"`
}
type Server ¶
type Server struct {
BasicContext `json:"server"`
}
type Stream ¶
type Stream struct {
BasicContext `json:"stream"`
}
type Types ¶
type Types struct {
BasicContext `json:"types"`
}
Click to show internal directories.
Click to hide internal directories.