config

package
v0.0.0-...-f6de6f3 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2015 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Server       ServerConfig        `gcfg:"server"`
	Db           DbConfig            `gcfg:"db"`
	RedisGeneral RedisGeneralConfig  `gcfg:"redis-general"`
	RedisMaster  RedisInstanceConfig `gcfg:"redis-master"`
	RedisSlave   RedisInstanceConfig `gcfg:"redis-slave"`
}

func LoadConfig

func LoadConfig(path string) *Config

type DbConfig

type DbConfig struct {
	ConnectionStringMaster string `gcfg:"connection-string-master"`
	ConnectionStringSlave  string `gcfg:"connection-string-slave"`
	Type                   string `gcfg:"type"`
	Engine                 string `gcfg:"engine"`
	Encoding               string `gcfg:"encoding"`
	UserTable              string `gcfg:"user-table"`
	UserTableKey           string `gcfg:"user-table-key"`
}

type RedisGeneralConfig

type RedisGeneralConfig struct {
	Prefix string `gcfg:"prefix"`
}

type RedisInstanceConfig

type RedisInstanceConfig struct {
	UseThisInstance bool          `gcfg:"use-this-instance"`
	Address         string        `gcfg:"address"`
	Password        string        `gcfg:"password"`
	MaxIdleConn     int           `gcfg:"max-idle-connections"`
	IdleTimeoutSec  time.Duration `gcfg:"idle-timeout-in-seconds"`
}

type ServerConfig

type ServerConfig struct {
	Address                     string `gcfg:"address"`
	AccessTokenExpirationInSec  int    `gcfg:"access-token-expiration-in-sec"`
	RefreshTokenExpirationInSec int    `gcfg:"refresh-token-expiration-in-sec"`
	AllowMultipleAccessTokens   bool   `gcfg:"allow-multiple-access-tokens"`
	ForceReadOnly               bool   `gcfg:"force-read-only"`
}

Jump to

Keyboard shortcuts

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