Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var RootCmd = &cobra.Command{ Use: "openserp", Short: "Open SERP", Long: `Get [Google, Yandex, Baidu] search engine results via API or CLI.`, Version: version, SilenceUsage: true, PersistentPreRunE: func(cmd *cobra.Command, args []string) error { err := initializeConfig(cmd) if err != nil { return err } core.InitLogger(config.Server.IsVerbose, config.Server.IsDebug) logrus.Debugf("Final config: %+v", config) return nil }, }
Functions ¶
This section is empty.
Types ¶
type CORSConfig ¶ added in v0.6.0
type CacheConfig ¶ added in v0.6.0
type CircuitBreakerConfig ¶ added in v0.6.0
type Config ¶ added in v0.2.1
type Config struct {
Server ServerConfig `mapstructure:"server"`
App AppConfig `mapstructure:"app"`
Proxies core.ProxiesConfig `mapstructure:"proxies"`
Cache CacheConfig `mapstructure:"cache"`
Resilience ResilienceConfig `mapstructure:"resilience"`
CircuitBreaker CircuitBreakerConfig `mapstructure:"circuit_breaker"`
CORS CORSConfig `mapstructure:"cors"`
Config2Capcha Config2Captcha `mapstructure:"2captcha"`
GoogleConfig EngineConfig `mapstructure:"google"`
YandexConfig EngineConfig `mapstructure:"yandex"`
BaiduConfig EngineConfig `mapstructure:"baidu"`
BingConfig EngineConfig `mapstructure:"bing"`
DuckDuckGoConfig EngineConfig `mapstructure:"duckduckgo"`
}
type Config2Captcha ¶ added in v0.4.1
type Config2Captcha struct {
ApiKey string `mapstructure:"apikey"`
}
type EngineConfig ¶ added in v0.6.0
type EngineConfig struct {
core.SearchEngineOptions `mapstructure:",squash"`
Proxy string `mapstructure:"proxy"`
}
type ResilienceConfig ¶ added in v0.6.0
type ServerConfig ¶ added in v0.6.0
type ServerConfig struct {
Host string `mapstructure:"host"`
Port int `mapstructure:"port"`
ConfigPath string `mapstructure:"config_path"`
IsDebug bool `mapstructure:"debug"`
IsVerbose bool `mapstructure:"verbose"`
IsRawRequests bool `mapstructure:"raw_requests"`
Insecure bool `mapstructure:"insecure"`
}
Click to show internal directories.
Click to hide internal directories.