cstr

package
v0.0.0-...-2e345a2 Latest Latest
Warning

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

Go to latest
Published: May 22, 2019 License: MIT Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Connecter

type Connecter interface {
	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