config

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MustInit added in v0.2.1

func MustInit()

Types

type Config

type Config struct {
	DebugMode         bool           `yaml:"DebugMode"`
	NeedPublishConfig bool           `yaml:"NeedPublishConfig"`
	ServerPort        int            `yaml:"ServerPort"`
	CostCfg           CostConfig     `yaml:"CostConfig"`
	WriteDB           DBConfig       `yaml:"WriteDB"`
	ReadDB            DBConfig       `yaml:"ReadDB"`
	EtcdConfig        *EtcdConfig    `yaml:"EtcdConfig"`
	JwtToken          JwtTokenConfig `yaml:"JwtToken"`
}
var GlobalConfig *Config

type CostConfig

type CostConfig struct {
	QueryOrderIntvalSec          int `yaml:"QueryOrderIntvalSec"`
	QueryAlibabaCloudOrderPerMin int `yaml:"QueryAlibabaCloudOrderPerMin"`
}

type DBConfig

type DBConfig struct {
	Name         string `yaml:"Name"`
	Host         string `yaml:"Host"`
	Port         string `yaml:"Port"`
	User         string `yaml:"User"`
	Password     string `yaml:"Password"`
	Timeout      string `yaml:"Timeout"`
	ReadTimeout  string `yaml:"ReadTimeout"`
	WriteTimeout string `yaml:"WriteTimeout"`
	MaxIdleConns int    `yaml:"MaxIdleConns"`
	MaxOpenConns int    `yaml:"MaxOpenConns"`
}

type EtcdConfig

type EtcdConfig struct {
	Endpoints   []string      `yaml:"Endpoints"`
	DailTimeout time.Duration `yaml:"DailTimeout"`
}

type JwtTokenConfig

type JwtTokenConfig struct {
	JwtTokenSignKey        string `yaml:"JwtTokenSignKey"`
	JwtTokenCreatedExpires int64  `yaml:"JwtTokenCreatedExpires"`
	JwtTokenRefreshExpires int64  `yaml:"JwtTokenRefreshExpires"`
	BindContextKeyName     string `yaml:"BindContextKeyName"`
}

Jump to

Keyboard shortcuts

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