cfg

package
v0.0.0-...-c9e90d7 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2017 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GlobalConfigPath string

Functions

This section is empty.

Types

type CacheCfg

type CacheCfg struct {
	Memcached []string `json:"memcache"`
	Redis     RedisCfg `json:"redis"`
}

type Config

type Config interface {
	SymbolsPath() string
	RabbitServer() string
	RabbitQueue() string
	RabbitPostExchange() string
	RabbitPostType() string
	ElasticUrl() string
	Memcache() []string
	RedisAddres() string
	RedisPassword() string
	LogLevel() string
	WebBlackListSignaturs() []string
}
var GlobalConfig Config

func FromJson

func FromJson(pathTo string) (Config, error)

type JsonConfig

type JsonConfig struct {
	SymbolsPathName   string     `json:"symbols_pathname"`
	Rabbit            *RabbitCfg `json:"rabbit_cfg"`
	Cache             *CacheCfg  `json:"cache"`
	Elastic           string     `json:"elastic"`
	Log               *LogCfg    `json:"log"`
	WebBListSignaturs []string   `json:"web_blacklist_signaturs"`
}

func (*JsonConfig) ElasticUrl

func (cfg *JsonConfig) ElasticUrl() string

func (*JsonConfig) LogLevel

func (cfg *JsonConfig) LogLevel() string

func (*JsonConfig) Memcache

func (cfg *JsonConfig) Memcache() []string

func (*JsonConfig) RabbitPostExchange

func (cfg *JsonConfig) RabbitPostExchange() string

func (*JsonConfig) RabbitPostType

func (cfg *JsonConfig) RabbitPostType() string

func (*JsonConfig) RabbitQueue

func (cfg *JsonConfig) RabbitQueue() string

func (*JsonConfig) RabbitServer

func (cfg *JsonConfig) RabbitServer() string

func (*JsonConfig) RedisAddres

func (cfg *JsonConfig) RedisAddres() string

func (*JsonConfig) RedisPassword

func (cfg *JsonConfig) RedisPassword() string

func (*JsonConfig) SymbolsPath

func (cfg *JsonConfig) SymbolsPath() string

func (*JsonConfig) WebBlackListSignaturs

func (cfg *JsonConfig) WebBlackListSignaturs() []string

type LogCfg

type LogCfg struct {
	Level string `json:"level"`
}

type RabbitCfg

type RabbitCfg struct {
	Server   string `json:"server"`
	Queue    string `json:"queue"`
	Exchange string `json:"post-exchange"`
	Type     string `json:"post-type"`
}

type RedisCfg

type RedisCfg struct {
	Address  string `json:"address"`
	Password string `json:"password"`
}

Jump to

Keyboard shortcuts

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