Documentation
¶
Index ¶
- Constants
- func FmtCode(content string) (fmtContent string)
- func GetConfPath(dir ...string) string
- func GetLogLevel(output string) int
- func GetNginxPIDPath() string
- func Reload() string
- func Restart() string
- func TestConf() string
- type NgxConfig
- type NgxDirective
- type NgxLocation
- type NgxServer
- type NgxUpstream
Constants ¶
View Source
const ( Debug = iota Info Notice Warn Error Crit Alert Emerg )
View Source
const ( Server = "server" Location = "location" Upstream = "upstream" )
Variables ¶
This section is empty.
Functions ¶
func GetConfPath ¶
func GetLogLevel ¶
func GetNginxPIDPath ¶
func GetNginxPIDPath() string
Types ¶
type NgxConfig ¶
type NgxConfig struct {
FileName string `json:"file_name"`
Name string `json:"name"`
Upstreams []*NgxUpstream `json:"upstreams"`
Servers []*NgxServer `json:"servers"`
Custom string `json:"custom"`
// contains filtered or unexported fields
}
func NewNgxConfig ¶
func ParseNgxConfig ¶
func ParseNgxConfigByContent ¶
func (*NgxConfig) BuildConfig ¶
type NgxDirective ¶
type NgxDirective struct {
Directive string `json:"directive"`
Params string `json:"params"`
Comments string `json:"comments"`
}
func (*NgxDirective) Orig ¶
func (d *NgxDirective) Orig() string
func (*NgxDirective) ParseDirective ¶
func (d *NgxDirective) ParseDirective(directive gonginx.IDirective, deep int)
func (*NgxDirective) TrimParams ¶
func (d *NgxDirective) TrimParams()
type NgxLocation ¶
type NgxLocation struct {
Path string `json:"path"`
Content string `json:"content"`
Comments string `json:"comments"`
}
func (*NgxLocation) ParseLocation ¶
func (l *NgxLocation) ParseLocation(directive gonginx.IDirective, deep int)
type NgxServer ¶
type NgxServer struct {
Directives []*NgxDirective `json:"directives"`
Locations []*NgxLocation `json:"locations"`
Comments string `json:"comments"`
}
func NewNgxServer ¶
func NewNgxServer() *NgxServer
func (*NgxServer) ParseServer ¶
func (s *NgxServer) ParseServer(directive gonginx.IDirective)
type NgxUpstream ¶
type NgxUpstream struct {
Name string `json:"name"`
Directives []*NgxDirective `json:"directives"`
Comments string `json:"comments"`
}
Click to show internal directories.
Click to hide internal directories.