Documentation ¶
Index ¶
- func CleanBase(pp ...string) string
- func EnvBool(key string, def bool) bool
- func EnvDuration(key string, def time.Duration) time.Duration
- func EnvFloat32(key string, def float32) float32
- func EnvInt(key string, def int) int
- func EnvString(key string, def string) string
- type CortezaOpt
- type EnvironmentOpt
- type EsOpt
- type HttpServerOpt
- type IndexerOpt
- type Options
- type SearcherOpt
- type WaitForOpt
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnvFloat32 ¶
Types ¶
type CortezaOpt ¶
func Corteza ¶
func Corteza() (o *CortezaOpt, err error)
type EnvironmentOpt ¶
type EnvironmentOpt struct {
Environment string `env:"ENVIRONMENT"`
}
func Environment ¶
func Environment() (o *EnvironmentOpt)
Environment initializes and returns a EnvironmentOpt with default values
func (EnvironmentOpt) IsDevelopment ¶
func (e EnvironmentOpt) IsDevelopment() bool
func (EnvironmentOpt) IsProduction ¶
func (e EnvironmentOpt) IsProduction() bool
func (EnvironmentOpt) IsTest ¶
func (e EnvironmentOpt) IsTest() bool
type EsOpt ¶
type EsOpt struct { Addresses []string `env:"ES_ADDRESS"` Username string `env:"ES_USERNAME"` Password string `env:"ES_PASSWORD"` Secure bool `env:"ES_SECURE"` EnableRetryOnTimeout bool `env:"ES_ENABLE_RETRY_ON_TIMEOUT"` MaxRetries int `env:"ES_MAX_RETRIES"` IndexInterval int `env:"ES_INDEX_INTERVAL"` }
type HttpServerOpt ¶
type HttpServerOpt struct { Addr string `env:"HTTP_ADDR"` EnableHealthcheckRoute bool `env:"HTTP_ENABLE_HEALTHCHECK_ROUTE"` EnableVersionRoute bool `env:"HTTP_ENABLE_VERSION_ROUTE"` BaseUrl string `env:"HTTP_BASE_URL"` ApiBaseUrl string `env:"HTTP_API_BASE_URL"` }
func HttpServer ¶
func HttpServer() (o *HttpServerOpt)
HttpServer initializes and returns a HTTPServerOpt with default values
type IndexerOpt ¶
type IndexerOpt struct { Enabled bool //HttpAddr string CortezaServerBaseUrl string CortezaServerAuthUrl string CortezaDiscoveryAPI string Schemas []*schema }
func Indexer ¶
func Indexer() (o *IndexerOpt, err error)
type Options ¶
type Options struct { Corteza CortezaOpt ES EsOpt Indexer IndexerOpt Searcher SearcherOpt Environment EnvironmentOpt HTTPServer HttpServerOpt WaitFor WaitForOpt }
type SearcherOpt ¶
type SearcherOpt struct { Enabled bool //HttpAddr string JwtSecret []byte ClientKey string ClientSecret string // temp fix: remove it once allowed role is fixed on server AllowedRole map[interface{}]bool }
func Searcher ¶
func Searcher() (*SearcherOpt, error)
type WaitForOpt ¶
type WaitForOpt struct { Delay time.Duration `env:"WAIT_FOR"` StatusPage bool `env:"WAIT_FOR_STATUS_PAGE"` }
func WaitFor ¶
func WaitFor() (o *WaitForOpt)
WaitFor initializes and returns a WaitForOpt with default values
Click to show internal directories.
Click to hide internal directories.