g

package
v0.0.0-...-9551cad Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	//VERSION ...
	VERSION = "0.1"
)

Functions

func ParseConfig

func ParseConfig(cfg string)

ParseConfig init the global config file

Types

type ESConfig

type ESConfig struct {
	Enabled     bool   `json:"enabled"`
	IndexPrefix string `json:"indexPrefix"`
	IndexSuffix string `json:"indexSuffix"`
}

ESConfig for dump

type GlobalConfig

type GlobalConfig struct {
	Debug bool         `json:"debug"`
	HTTP  *HTTPConfig  `json:"http"`
	Redis *RedisConfig `json:"redis"`
	ES    *ESConfig    `json:"es"`
}

GlobalConfig ...

func Config

func Config() *GlobalConfig

Config returns GlobalConfig struct

func (*GlobalConfig) String

func (c *GlobalConfig) String() string

type HTTPConfig

type HTTPConfig struct {
	Enabled bool   `json:"enabled"`
	Listen  string `json:"listen"`
}

HTTPConfig for debug

type RedisConfig

type RedisConfig struct {
	Enabled bool   `json:"enabled"`
	Server  string `json:"server"`
}

RedisConfig for dump

Jump to

Keyboard shortcuts

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