types

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2020 License: MIT Imports: 1 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Envrion

type Envrion string

Envrion .

const (
	// DevEnv defination .
	DevEnv Envrion = "dev"
	// ProdEnv defination .
	ProdEnv Envrion = "prod"
	// SimuEnv defination.
	SimuEnv Envrion = "simu"
)

func ParseEnvrion

func ParseEnvrion(s string) Envrion

ParseEnvrion srting to Envrion

func (Envrion) String

func (env Envrion) String() string

type MgoConfig

type MgoConfig struct {
	Addrs     string `json:"addrs"`
	Timeout   int    `json:"timeout"`
	Database  string `json:"database"`
	Username  string `json:"username"`
	Password  string `json:"password"`
	PoolLimit int    `json:"poollimit"`
}

MgoConfig . mongo host:port/db_name -u username -p password

func (*MgoConfig) String

func (c *MgoConfig) String() string

type MysqlC

type MysqlC struct {
	UserName  string `json:"username"`
	Password  string `json:"password"`
	Addr      string `json:"addr"`
	DBName    string `json:"dbname"`
	Charset   string `json:"charset"`
	ParseTime bool   `json:"parsetime"`
	Loc       string `json:"loc"`
	Pool      int    `json:"pool"`
}

MysqlC mysql server config struct

func (*MysqlC) String

func (c *MysqlC) String() string

@output "user:password@addr:port/dbname?charset=utf8&parseTime=True&loc=Local"

type RedisConfig

type RedisConfig struct {
	Addr     string `json:"addr"`
	Password string `json:"password"`
	DB       int    `json:"db"`
}

RedisConfig .

func (*RedisConfig) String

func (c *RedisConfig) String() string

type SQLite3Config

type SQLite3Config struct {
	Name string // DB file name
}

SQLite3Config .

Directories

Path Synopsis
Package code to define some code
Package code to define some code

Jump to

Keyboard shortcuts

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