config

package
v0.0.0-...-92e9bbc Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2017 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Host  string      `toml:"host"`
	Port  int         `toml:"port"`
	MySQL MySQLConfig `toml:"mysql"`
	ES    ESConfig    `toml:"elasticsearch"`
}

func Init

func Init(filename string) (*Config, error)

type ESConfig

type ESConfig struct {
	Url   string `toml:"url"`
	Index string `toml:"index"`
}

type MySQLConfig

type MySQLConfig struct {
	Host     string `toml:"host"`
	Port     int    `toml:"port"`
	User     string `toml:"user"`
	Password string `toml:"password"`
	DBName   string `toml:"dbname"`
}

func (MySQLConfig) Connect

func (m MySQLConfig) Connect() (mysql.Conn, error)

Jump to

Keyboard shortcuts

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