config

package
v0.0.0-...-c8fa0a4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 2, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultRedisDB = 0
	TestRedisDB    = 1
)

Variables

This section is empty.

Functions

func GetEnv

func GetEnv(envVar, defaultValue string) string

func HasEnv

func HasEnv(env string) (string, bool)

func NewDefaultRedisClient

func NewDefaultRedisClient() *redis.Client

func NewHTTPClient

func NewHTTPClient() *http.Client

func NewLog

func NewLog() *logrus.Entry

func NewRediSearchClient

func NewRediSearchClient(indexName string) *redisearch.Client

func NewRediSearchClientFromConfig

func NewRediSearchClientFromConfig(cfg *AppConfig, idxName string) *redisearch.Client

func NewRedisClientFromConfig

func NewRedisClientFromConfig(cfg *AppConfig) *redis.Client

func NewRedisClientTest

func NewRedisClientTest(cfg *AppConfig) *redis.Client

Types

type AppConfig

type AppConfig struct {
	*viper.Viper
}

func NewConfig

func NewConfig() *AppConfig

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL