cstr

package
v0.0.0-...-e8acdfa Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2018 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Amqp

type Amqp struct {
	Host     string
	Port     int
	Username string `conf:"optional"`
	Password string `conf:"optional"`
}

func (Amqp) Cstr

func (a Amqp) Cstr() string

type Connecter

type Connecter interface {
	Cstr() string
}

type Crate

type Crate struct {
	Host string
	Port int
}

func (Crate) Cstr

func (c Crate) Cstr() string

type Memcache

type Memcache struct {
	Host string
	Port int
}

func (Memcache) Cstr

func (m Memcache) Cstr() string

type Mongodb

type Mongodb struct {
	Host     string
	Port     int
	Db       string
	Username string `conf:"optional"`
	Password string `conf:"optional"`
	Replicas string `conf:"optional"`
	Options  string `conf:"optional"`
}

func (Mongodb) Cstr

func (m Mongodb) Cstr() string

type Mysql

type Mysql struct {
	Host     string
	Port     int
	Db       string
	Username string
	Password string
	Timezone string `conf:"optional"`
}

func (Mysql) Cstr

func (m Mysql) Cstr() string

type Redis

type Redis struct {
	Host string
	Port int
	Db   int
	Name string `conf:"optional"`
}

func (Redis) Cstr

func (r Redis) Cstr() string

type Sqlite

type Sqlite struct {
	Path string
}

func (Sqlite) Cstr

func (s Sqlite) Cstr() string

type Storage

type Storage struct {
	Engine string
	Conn   string
	Mdb    string // mongo database name
}

func Get

func Get(useMaster bool) Storage

func ReadConfig

func ReadConfig(container string) (s Storage)

Jump to

Keyboard shortcuts

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