Documentation
¶
Overview ¶
Package nginxconf converts nginx configuration text into config file documents. It only reads text.
Index ¶
Constants ¶
const ( StatusMapped = "mapped" StatusPartial = "partial" StatusUnsupported = "unsupported" )
Report row statuses.
const DefaultPrefix = "/etc/nginx"
DefaultPrefix is where absolute include paths usually point; it is remapped onto the import root.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Options ¶
type Options struct {
Limits Limits
// Prefix is the absolute directory nginx loaded its files from.
Prefix string
// Apps overrides the app for a host name, upstream name or upstream address.
Apps map[string]string
// Valid reports whether a generated document passes file validation; nil refuses all.
Valid func(name string, data []byte) bool
// MaxHeaderRules caps header rules per host.
MaxHeaderRules int
}
Options controls one import.
type Report ¶
Report lists every directive read, plus warnings that deserve a look before applying.
type Row ¶
type Row struct {
File string `json:"file"`
Line int `json:"line"`
Directive string `json:"directive"`
Status string `json:"status"`
Target string `json:"target,omitempty"`
Note string `json:"note,omitempty"`
}
Row is the fate of one directive. It never carries argument values, which may be secrets.