dbconfigs

package
v0.0.0-...-7c5168d Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2013 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Overview

Package dbconfigs is reusable by vt tools to load the db configs file.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterCommonFlags

func RegisterCommonFlags() (*string, *string)

Types

type DBConfig

type DBConfig struct {
	Host       string `json:"host"`
	Port       int    `json:"port"`
	Uname      string `json:"uname"`
	Pass       string `json:"pass"`
	DbName     string `json:"dbname"`
	UnixSocket string `json:"unix_socket"`
	Charset    string `json:"charset"`
	Memcache   string `json:"memcache"`
	Keyspace   string `json:"keyspace"`
	Shard      string `json:"shard"`
}

func (DBConfig) MysqlParams

func (d DBConfig) MysqlParams() mysql.ConnectionParams

func (DBConfig) Redacted

func (d DBConfig) Redacted() DBConfig

func (DBConfig) String

func (d DBConfig) String() string

type DBConfigs

type DBConfigs struct {
	App      DBConfig               `json:"app"`
	Dba      mysql.ConnectionParams `json:"dba"`
	Repl     mysql.ConnectionParams `json:"repl"`
	Memcache string                 `json:"memcache"`
}

func Init

func Init(socketFile, dbConfigsFile, dbCredentialsFile string) (dbcfgs DBConfigs, err error)

func (DBConfigs) Redacted

func (dbcfgs DBConfigs) Redacted() DBConfigs

func (DBConfigs) String

func (dbcfgs DBConfigs) String() string

Jump to

Keyboard shortcuts

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