Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // Root configurations IncludePaths []string `cli:"I,include_path" yaml:"include_paths"` Transforms []string `cli:"t,transformer" yaml:"transformers"` Help bool `cli:"h,help"` Version bool `cli:"V"` Remote bool `cli:"r,remote" yaml:"remote"` Json bool `cli:"json"` Request string `cli:"request"` // Remote options, only provided via environment variable FastlyServiceID string `env:"FASTLY_SERVICE_ID"` FastlyApiKey string `env:"FASTLY_API_KEY"` // CLI subcommands Commands Commands // Override Origin fetching URL OverrideBackends map[string]*OverrideBackend `yaml:"override_backends"` // Override resource limits OverrideMaxBackends int `cli:"max_backends" yaml:"max_backends"` OverrideMaxAcls int `cli:"mac_acls" yaml:"max_acls"` // Linter configuration Linter *LinterConfig `yaml:"linter"` // Simulator configuration Simulator *SimulatorConfig `yaml:"simulator"` // Testing configuration Testing *TestConfig `yaml:"testing"` }
type LinterConfig ¶ added in v1.0.0
type LinterConfig struct { VerboseLevel string `yaml:"verbose"` VerboseWarning bool `cli:"v"` VerboseInfo bool `cli:"vv"` Rules map[string]string `yaml:"rules"` }
Linter configuration
type OverrideBackend ¶ added in v1.0.0
type RequestConfig ¶ added in v1.0.0
type RequestConfig struct { RemoteIP string `yaml:"remote_ip" json:"remote_ip"` RequestHeaders map[string]string `yaml:"headers" json:"headers"` Path string `yaml:"path" json:"path"` UserAgent string `yaml:"user_agent" json:"user_agent"` }
func LoadRequestConfig ¶ added in v1.0.0
func LoadRequestConfig(path string) (*RequestConfig, error)
func (*RequestConfig) SetRequest ¶ added in v1.0.0
func (r *RequestConfig) SetRequest(req *http.Request)
type SimulatorConfig ¶ added in v1.0.0
type SimulatorConfig struct { Port int `cli:"p,port" yaml:"port" default:"3124"` IsDebug bool `cli:"debug"` // Enable only in CLI option IncludePaths []string // Copy from root field // Override Request configuration OverrideRequest *RequestConfig }
Simulator configuration
type TestConfig ¶ added in v1.0.0
type TestConfig struct { Timeout int `cli:"t,timeout" yaml:"timeout"` Filter string `cli:"f,filter" default:"*.test.vcl"` IncludePaths []string // Copy from root field OverrideHost string `yaml:"host"` // Override Request configuration OverrideRequest *RequestConfig }
Testing configuration
Click to show internal directories.
Click to hide internal directories.