Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AttachWatcher ¶ added in v0.4.0
AttachWatcher start the watcher, if any error was produced while the starting process the application would crash you need to pass a function, this function is the function that will be executed when the watcher receive any event the type of defined on the InitializeWatcher function
Types ¶
type Config ¶ added in v0.3.3
type Config struct { ImpostersPath string `yaml:"imposters_path"` Port int `yaml:"port"` Host string `yaml:"host"` CORS ConfigCORS `yaml:"cors"` Proxy ConfigProxy `yaml:"proxy"` Secure bool `yaml:"secure"` Watcher bool `yaml:"watcher"` }
Config representation of config file yaml
type ConfigCORS ¶ added in v0.3.3
type ConfigCORS struct { Methods []string `yaml:"methods"` Headers []string `yaml:"headers"` Origins []string `yaml:"origins"` ExposedHeaders []string `yaml:"exposed_headers"` AllowCredentials bool `yaml:"allow_credentials"` }
ConfigCORS representation of section CORS of the yaml
type ConfigOpt ¶ added in v0.4.0
ConfigOpt function to encapsulate optional parameters
func WithConfigFile ¶ added in v0.4.0
WithConfigFile unmarshal content of config file to Config struct
func WithProxyConfiguration ¶ added in v0.4.0
WithProxyConfiguration preparing the server with the proxy configuration that the user has indicated
func WithWatcherConfiguration ¶ added in v0.4.1
WithWatcherConfiguration preparing server to do auto-reload
type ConfigProxy ¶ added in v0.4.0
ConfigProxy is a representation of section proxy of the yaml
type ProxyMode ¶ added in v0.4.0
type ProxyMode uint8
ProxyMode is enumeration of proxy server modes
func StringToProxyMode ¶ added in v0.4.0
StringToProxyMode convert string into a ProxyMode if not exists return a none mode and an error
func (*ProxyMode) UnmarshalYAML ¶ added in v0.4.0
UnmarshalYAML implementation of yaml.Unmarshaler interface