config

package
v0.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2018 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// RPC Section
	KeyRpcBind                   = "rpc.bind"
	KeyRpcHost                   = "rpc.host"
	KeyRpcPort                   = "rpc.port"
	KeyRpcOptionMaxRecvMsgSizeMB = "rpc.option.max_recv_msg_size_mb"
	KeyRpcOptionMaxSendMsgSizeMB = "rpc.option.max_send_msg_size_mb"
	KeyHttpBind                  = "rpc.http.bind"
	KeyHttpHost                  = "rpc.http.host"
	KeyHttpPort                  = "rpc.http.port"

	// Database
	KeyDBMongoAddrs         = "db.mongo.addrs"
	KeyDBMongoPerformAuth   = "db.mongo.with_auth"
	KeyDBMongoAuthDatabase  = "db.mongo.auth.db"
	KeyDBMongoAuthUser      = "db.mongo.auth.user"
	KeyDBMongoAuthPass      = "db.mongo.auth.pass"
	KeyDBMongoAuthMechanism = "db.mongo.auth.mechanism"
	KeyDBMongoTimeoutSec    = "db.mongo.timeout_sec"
	KeyDBMongoDatabase      = "db.mongo.db"

	// Client
	KeyClientUserName   = "client.user.name"
	KeyClientUserSecret = "client.user.secret"
	KeyClientProject    = "client.project"

	KeyFsWorkdir = "fs.workdir"
)

Variables

This section is empty.

Functions

func GetAuthInfo

func GetAuthInfo() (auth *user.AuthToken)

func GetClientUserName

func GetClientUserName() string

func GetClientUserSecret

func GetClientUserSecret() string

func GetDBMongoAddrs

func GetDBMongoAddrs() []string

func GetDBMongoAuth

func GetDBMongoAuth() *mongo.Auth

func GetDBMongoTimeout

func GetDBMongoTimeout() time.Duration

func GetFsWorkdir

func GetFsWorkdir() string

func GetHttpBind

func GetHttpBind() string

func GetHttpHost

func GetHttpHost() string

func GetHttpPort

func GetHttpPort() int

func GetRpcBind

func GetRpcBind() string

func GetRpcHost

func GetRpcHost() string

func GetRpcOptionMaxRecvMsgSize

func GetRpcOptionMaxRecvMsgSize() int

func GetRpcOptionMaxRecvMsgSizeMB

func GetRpcOptionMaxRecvMsgSizeMB() int

func GetRpcOptionMaxSendMsgSize

func GetRpcOptionMaxSendMsgSize() int

func GetRpcOptionMaxSendMsgSizeMB

func GetRpcOptionMaxSendMsgSizeMB() int

func GetRpcPort

func GetRpcPort() int

func InitMongoClient

func InitMongoClient() (client *mongo.Client, err error)

func LoadConfig

func LoadConfig(path string) (err error)

this function will search and load configurations

func SetClientUserName

func SetClientUserName(user string) error

func SetClientUserSecret

func SetClientUserSecret(secret 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