mirror of
https://github.com/caddyserver/caddy.git
synced 2024-11-26 10:13:39 +08:00
fix struct names (#6151)
Signed-off-by: thirdkeyword <fliterdashen@gmail.com>
This commit is contained in:
parent
5a4374bea0
commit
277472d081
|
@ -381,24 +381,24 @@ func CELMatcherImpl(macroName, funcName string, matcherDataTypes []*cel.Type, fa
|
||||||
type CELMatcherFactory func(data ref.Val) (RequestMatcher, error)
|
type CELMatcherFactory func(data ref.Val) (RequestMatcher, error)
|
||||||
|
|
||||||
// matcherCELLibrary is a simplistic configurable cel.Library implementation.
|
// matcherCELLibrary is a simplistic configurable cel.Library implementation.
|
||||||
type matcherCELLibary struct {
|
type matcherCELLibrary struct {
|
||||||
envOptions []cel.EnvOption
|
envOptions []cel.EnvOption
|
||||||
programOptions []cel.ProgramOption
|
programOptions []cel.ProgramOption
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewMatcherCELLibrary creates a matcherLibrary from option setes.
|
// NewMatcherCELLibrary creates a matcherLibrary from option setes.
|
||||||
func NewMatcherCELLibrary(envOptions []cel.EnvOption, programOptions []cel.ProgramOption) cel.Library {
|
func NewMatcherCELLibrary(envOptions []cel.EnvOption, programOptions []cel.ProgramOption) cel.Library {
|
||||||
return &matcherCELLibary{
|
return &matcherCELLibrary{
|
||||||
envOptions: envOptions,
|
envOptions: envOptions,
|
||||||
programOptions: programOptions,
|
programOptions: programOptions,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (lib *matcherCELLibary) CompileOptions() []cel.EnvOption {
|
func (lib *matcherCELLibrary) CompileOptions() []cel.EnvOption {
|
||||||
return lib.envOptions
|
return lib.envOptions
|
||||||
}
|
}
|
||||||
|
|
||||||
func (lib *matcherCELLibary) ProgramOptions() []cel.ProgramOption {
|
func (lib *matcherCELLibrary) ProgramOptions() []cel.ProgramOption {
|
||||||
return lib.programOptions
|
return lib.programOptions
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -32,7 +32,7 @@ func init() {
|
||||||
// reverse proxy upstreams in the pool.
|
// reverse proxy upstreams in the pool.
|
||||||
type adminUpstreams struct{}
|
type adminUpstreams struct{}
|
||||||
|
|
||||||
// upstreamResults holds the status of a particular upstream
|
// upstreamStatus holds the status of a particular upstream
|
||||||
type upstreamStatus struct {
|
type upstreamStatus struct {
|
||||||
Address string `json:"address"`
|
Address string `json:"address"`
|
||||||
NumRequests int `json:"num_requests"`
|
NumRequests int `json:"num_requests"`
|
||||||
|
|
|
@ -329,7 +329,7 @@ type Templates struct {
|
||||||
logger *zap.Logger
|
logger *zap.Logger
|
||||||
}
|
}
|
||||||
|
|
||||||
// Customfunctions is the interface for registering custom template functions.
|
// CustomFunctions is the interface for registering custom template functions.
|
||||||
type CustomFunctions interface {
|
type CustomFunctions interface {
|
||||||
// CustomTemplateFunctions should return the mapping from custom function names to implementations.
|
// CustomTemplateFunctions should return the mapping from custom function names to implementations.
|
||||||
CustomTemplateFunctions() template.FuncMap
|
CustomTemplateFunctions() template.FuncMap
|
||||||
|
|
Loading…
Reference in New Issue
Block a user