Documentation
¶
Index ¶
- type Parser
- func (p *Parser) Clear(key string) error
- func (p *Parser) ClearSetHTTPS() error
- func (p *Parser) Config() *config.Config
- func (p *Parser) Dump() string
- func (p *Parser) Find(key string) ([]config.IDirective, error)
- func (p *Parser) FindOne(key string) (config.IDirective, error)
- func (p *Parser) GetAccessLog() (string, error)
- func (p *Parser) GetAltSvc() string
- func (p *Parser) GetErrorLog() (string, error)
- func (p *Parser) GetHSTS() bool
- func (p *Parser) GetHTTPS() bool
- func (p *Parser) GetHTTPSCiphers() string
- func (p *Parser) GetHTTPSProtocols() []string
- func (p *Parser) GetHTTPSRedirect() bool
- func (p *Parser) GetIncludes() (includes []string, comments [][]string, err error)
- func (p *Parser) GetIndex() ([]string, error)
- func (p *Parser) GetIndexWithComment() ([]string, []string, error)
- func (p *Parser) GetListen() ([][]string, error)
- func (p *Parser) GetOCSP() bool
- func (p *Parser) GetPHP() int
- func (p *Parser) GetRoot() (string, error)
- func (p *Parser) GetRootWithComment() (string, []string, error)
- func (p *Parser) GetServerName() ([]string, error)
- func (p *Parser) Set(key string, directives []*config.Directive) error
- func (p *Parser) SetAccessLog(accessLog string) error
- func (p *Parser) SetAltSvc(altSvc string) error
- func (p *Parser) SetErrorLog(errorLog string) error
- func (p *Parser) SetHSTS(hsts bool) error
- func (p *Parser) SetHTTPRedirect(httpRedirect bool) error
- func (p *Parser) SetHTTPS(cert, key string) error
- func (p *Parser) SetHTTPSCiphers(ciphers string) error
- func (p *Parser) SetHTTPSProtocols(protocols []string) error
- func (p *Parser) SetIncludes(includes []string, comments [][]string) error
- func (p *Parser) SetIndex(index []string) error
- func (p *Parser) SetIndexWithComment(index []string, comment []string) error
- func (p *Parser) SetListen(listen [][]string) error
- func (p *Parser) SetOCSP(ocsp bool) error
- func (p *Parser) SetPHP(php int) error
- func (p *Parser) SetRoot(root string) error
- func (p *Parser) SetRootWithComment(root string, comment []string) error
- func (p *Parser) SetServerName(serverName []string) error
- func (p *Parser) Sort()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Parser ¶
type Parser struct {
// contains filtered or unexported fields
}
Parser Nginx vhost 配置解析器
func (*Parser) ClearSetHTTPS ¶
func (*Parser) Find ¶
func (p *Parser) Find(key string) ([]config.IDirective, error)
Find 通过表达式查找配置 e.g. Find("server.listen")
func (*Parser) FindOne ¶
func (p *Parser) FindOne(key string) (config.IDirective, error)
FindOne 通过表达式查找一个配置 e.g. FindOne("server.server_name")
func (*Parser) GetAccessLog ¶
func (*Parser) GetErrorLog ¶
func (*Parser) GetHTTPSCiphers ¶
func (*Parser) GetHTTPSProtocols ¶
func (*Parser) GetHTTPSRedirect ¶
func (*Parser) GetIncludes ¶
func (*Parser) GetIndexWithComment ¶
func (*Parser) GetServerName ¶
func (*Parser) SetAccessLog ¶
func (*Parser) SetErrorLog ¶
func (*Parser) SetHTTPRedirect ¶
func (*Parser) SetHTTPSCiphers ¶
func (*Parser) SetHTTPSProtocols ¶
func (*Parser) SetIncludes ¶
func (*Parser) SetIndexWithComment ¶
func (*Parser) SetRootWithComment ¶
func (*Parser) SetServerName ¶
Click to show internal directories.
Click to hide internal directories.