Documentation ¶
Index ¶
- Variables
- func AddCSlashesIngoreSlash(s string, b ...rune) string
- func AsCaddy2LogFormat(value string) string
- func AsNginxLogFormat(value string) string
- func ExplodeCombinedLogFormat(value string) string
- func ParseDuration(str string) time.Duration
- func SplitBySpace(value string, formatter ...func(string) string) []string
- type CertPath
- type Item
- type LocationDef
- type Locations
- type NginxDomainInfo
- type SortByLen
- type UpstreamInfo
- type Values
- func (v Values) AddExtWildcardPrefix(path string) string
- func (v Values) AddPathWildcardSuffix(path string) string
- func (v Values) AddSlashes(val string) string
- func (v Values) AddSlashesSingleQuote(val string) string
- func (v Values) AddonAttr(addon string, item string, defaults ...string) string
- func (v Values) AddonAttrFullKey(fullKey string, item string, defaults ...string) string
- func (v Values) AsCaddy2LogFormat() string
- func (v Values) AsDuration(str string) time.Duration
- func (v Values) AsNginxLogFormat() string
- func (v Values) BCrypt(password string) string
- func (v Values) ExtensionsToMime(value string) []string
- func (v Values) GetAttrVal(addon string, item string, defaults ...string) string
- func (v Values) GetCerts(domains []string) []*CertPath
- func (v Values) GetDomainList() []string
- func (v Values) GetKVData(addon string, itemOr ...string) *echo.KVData
- func (v Values) GetKVList(addon string, itemOr ...string) []echo.KV
- func (v Values) GetNginxDomainList() []NginxDomainInfo
- func (v Values) GetSlice(key string) param.StringSlice
- func (v Values) GetValueList(addon string, itemOr ...string) []string
- func (v Values) GetWebdavGlobal() []*webdav.WebdavPerm
- func (v Values) GetWebdavUser() []*webdav.WebdavUser
- func (v Values) GroupByLocations(fields []string) Locations
- func (v Values) IsEnabled(key string, expectedValue ...string) bool
- func (v Values) Iterator(addon string, item string, prefix string, withQuotes ...bool) interface{}
- func (v Values) IteratorHeaderKV(addon string, item string, plusPrefix string, minusPrefix string, ...) interface{}
- func (v Values) IteratorKV(addon string, item string, prefix string, withQuotes ...bool) interface{}
- func (v Values) IteratorNginxProxyHeaderKV() interface{}
- func (v Values) NginxLimitRateWithUnit() string
- func (v Values) NginxLocations() Locations
- func (v Values) RegexpQuote(content string) string
- func (v Values) ServerGroup(key string, customHost string, withQuotes ...bool) interface{}
- func (v Values) SliceAddExtWildcardPrefix(content []string) []string
- func (v Values) SliceAddPathWildcardSuffix(content []string) []string
- func (v Values) SliceRegexpQuote(content []string) []string
- func (v Values) SplitBySpace(content string) []string
- func (v Values) SplitBySpaceWithExtWildcardPrefix(content string) []string
- func (v Values) SplitBySpaceWithPathWildcardSuffix(content string) []string
- func (v Values) SplitBySpaceWithPrefixAndSuffix(content string, prefix string, suffix string) []string
- func (v Values) SplitBySpaceWithRegexpQuote(content string) []string
- func (v Values) VhostConfigDir() string
Constants ¶
This section is empty.
Variables ¶
View Source
var Caddy2LogFormatReplacer = strings.NewReplacer(
`{method} {uri} {proto}`, `{request>method} {request>uri} {request>proto}`,
`{remote}`, `{request>remote_ip}`,
`{user}`, `{request>user_id}`,
`{when}`, `{ts}`,
`{method}`, `{request>method}`,
`{uri}`, `{request>uri}`,
`{proto}`, `{request>proto}`,
`{>Referer}`, `{request>headers>Referer>[0]}`,
`{>User-Agent}`, `{request>headers>User-Agent>[0]}`,
`{latency}`, `{duration}`,
)
{remote} - {user} [{when}] "{method} {scheme} {host} {uri} {proto}" {status} {size} "{>Referer}" "{>User-Agent}" {latency}
View Source
var NginxLogFormatReplacer = strings.NewReplacer(
`{method} {uri} {proto}`, `$request`,
`{remote}`, `$remote_addr`,
`{user}`, `$remote_user`,
`{when}`, `$time_local`,
`{method}`, `$request_method`,
`{scheme}`, `$scheme`,
`{host}`, `$http_host`,
`{uri}`, `$request_uri`,
`{proto}`, `$server_protocol`,
`{status}`, `$status`,
`{size}`, `$body_bytes_sent`,
`{>Referer}`, `$http_referer`,
`{>User-Agent}`, `$http_user_agent`,
`{latency}`, `$request_time`,
)
{remote} - {user} [{when}] "{method} {scheme} {host} {uri} {proto}" {status} {size} "{>Referer}" "{>User-Agent}" {latency}
Functions ¶
func AddCSlashesIngoreSlash ¶
func AsCaddy2LogFormat ¶
func AsNginxLogFormat ¶
func ParseDuration ¶
Types ¶
type LocationDef ¶
type Locations ¶
type Locations struct { SortedStaticPath []string SortedRegexpPath []string GroupByPath map[string][]*LocationDef }
type NginxDomainInfo ¶
type UpstreamInfo ¶
type UpstreamInfo struct { Scheme string Host string Path string UpstreamName string Rewrite string // rewrite ^/user/(.*)$ /$1 break; // contains filtered or unexported fields }
func (UpstreamInfo) String ¶
func (u UpstreamInfo) String() string
type Values ¶
func (Values) AddExtWildcardPrefix ¶
添加扩展名通配符前缀
func (Values) AddPathWildcardSuffix ¶
添加路径通配符后缀
func (Values) AddSlashes ¶
func (Values) AddSlashesSingleQuote ¶
func (Values) AddonAttrFullKey ¶
func (Values) AsCaddy2LogFormat ¶
func (Values) AsNginxLogFormat ¶
func (Values) ExtensionsToMime ¶
func (Values) GetAttrVal ¶
func (Values) GetDomainList ¶
func (Values) GetNginxDomainList ¶
func (v Values) GetNginxDomainList() []NginxDomainInfo
func (Values) GetWebdavGlobal ¶
func (v Values) GetWebdavGlobal() []*webdav.WebdavPerm
func (Values) GetWebdavUser ¶
func (v Values) GetWebdavUser() []*webdav.WebdavUser
func (Values) GroupByLocations ¶
func (Values) IteratorHeaderKV ¶
func (Values) IteratorKV ¶
func (Values) IteratorNginxProxyHeaderKV ¶
func (v Values) IteratorNginxProxyHeaderKV() interface{}
func (Values) NginxLimitRateWithUnit ¶ added in v1.4.9
func (Values) NginxLocations ¶
func (Values) RegexpQuote ¶
func (Values) ServerGroup ¶
func (Values) SliceAddExtWildcardPrefix ¶
func (Values) SliceAddPathWildcardSuffix ¶
func (Values) SliceRegexpQuote ¶
func (Values) SplitBySpace ¶
func (Values) SplitBySpaceWithExtWildcardPrefix ¶
func (Values) SplitBySpaceWithPathWildcardSuffix ¶
func (Values) SplitBySpaceWithPrefixAndSuffix ¶
func (Values) SplitBySpaceWithRegexpQuote ¶
func (Values) VhostConfigDir ¶
Click to show internal directories.
Click to hide internal directories.