config

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2015 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DatetimeFormat = "2006-01-02 15:04:05"
	DateFormat     = "2006-01-02"

	BasePath = "/tmp/"
	RepoPath = ""

	Port = ":9020"

	PrivateKey = ""

	SessionInterval = 1
	SessionExpire   = 3600
	CookieName      = "wolffy_sid"

	DBHost = ""
	DBUser = ""
	DBPwd  = ""
	DBName = ""
)
View Source
var (
	ERR_OK      = 0
	ERR_UNKNOWN = 1000

	ERR_SESSION_INVALID = 1001
	ERR_SESSION_EXPIRE  = 1002

	ERR_USER_NEED_CHANGE_PWD    = 2001
	ERR_USER_NOT_ADMIN          = 2002
	ERR_USER_NOT_FOUND          = 2003
	ERR_USER_PASSWORD_INCORRECT = 2004

	ERR_PROJECT_DEPLOYING     = 3001
	ERR_PROJECT_CLUSTER_EMPTY = 3002

	ERR = map[int]string{
		ERR_OK:                      "ok",
		ERR_UNKNOWN:                 "unknown error",
		ERR_SESSION_INVALID:         "session invalid",
		ERR_USER_NEED_CHANGE_PWD:    "need change password",
		ERR_USER_NOT_ADMIN:          "administrator required",
		ERR_USER_NOT_FOUND:          "user not found",
		ERR_USER_PASSWORD_INCORRECT: "password incorrect",

		ERR_PROJECT_DEPLOYING:     "project deploying",
		ERR_PROJECT_CLUSTER_EMPTY: "project clusters empty",
	}
)

Functions

func GetErr

func GetErr(errno int) error

func InitConfig

func InitConfig(configFile string) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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