config

package
v0.0.0-...-92ef796 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DatabaseConfig

type DatabaseConfig struct {
	MySqlConfig *MySqlConfig `yaml:"mysql"`
	RedisConfig *RedisConfig `yaml:"redis"`
	Neo4jConfig *Neo4jConfig `yaml:"neo4j"`
}

type ImConfig

type ImConfig struct {
	RedisFmt string `yaml:"redis-fmt"`
}

type JwtConfig

type JwtConfig struct {
	Secret   string `yaml:"secret"`
	Expire   int64  `yaml:"expire"`
	Issuer   string `yaml:"issuer"`
	RedisFmt string `yaml:"redis-fmt"`
}

type MetaConfig

type MetaConfig struct {
	DefaultPort int32 `yaml:"default-port"`
	DefPageSize int32 `yaml:"def-page-size"`
	MaxPageSize int32 `yaml:"max-page-size"`
}

type MySqlConfig

type MySqlConfig struct {
	Host     string `yaml:"host"`
	Port     int32  `yaml:"port"`
	Charset  string `yaml:"charset"`
	Name     string `yaml:"name"`
	User     string `yaml:"user"`
	Password string `yaml:"passwd"`
	IsLog    bool   `yaml:"log"`
}

type Neo4jConfig

type Neo4jConfig struct {
	Host     string `yaml:"host"`
	Port     int32  `yaml:"port"`
	User     string `yaml:"user"`
	Password string `yaml:"passwd"`
	IsLog    bool   `yaml:"log"`
}

type RedisConfig

type RedisConfig struct {
	Type     string `yaml:"type"`
	Host     string `yaml:"host"`
	Port     int32  `yaml:"port"`
	Db       int32  `yaml:"db"`
	Password string `yaml:"passwd"`

	ConnectTimeout int32 `yaml:"connect-timeout"`
	ReadTimeout    int32 `yaml:"read-timeout"`
	WriteTimeout   int32 `yaml:"write-timeout"`
}

type ServerConfig

type ServerConfig struct {
	RunMode        string          `yaml:"run-mode"`
	MetaConfig     *MetaConfig     `yaml:"meta"`
	ZkConfig       *ZkConfig       `yaml:"zookeeper"`
	DatabaseConfig *DatabaseConfig `yaml:"database"`
	JwtConfig      *JwtConfig      `yaml:"jwt"`
	ImConfig       *ImConfig       `yaml:"im"`
}

func Load

func Load(configPath string) (*ServerConfig, error)

type ZkConfig

type ZkConfig struct {
	Addr []*struct {
		Host string `yaml:"host"`
		Port int32  `yaml:"port"`
	} `yaml:"addr"`
	Root    string `yaml:"root"`
	Timeout int64  `yaml:"timeout"`
}

Jump to

Keyboard shortcuts

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