config

package
v4.0.4 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2021 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const Version = 1

Variables

View Source
var (
	GlobalOps    opsStruct
	LocalOps     opsStruct
	LocalOpsList []string
)
View Source
var Ident string

Functions

func NewClusterNode

func NewClusterNode(addrs []string) *tsdb.ClusterNode

func Parse

func Parse(ymlFile string) error

Parse configuration file

Types

type AuthExtraSection

type AuthExtraSection struct {
	Enable        bool   `yaml:"enable"`
	Debug         bool   `yaml:"debug" description:"debug"`
	DebugUser     string `yaml:"debugUser" description:"debug username"`
	WhiteList     bool   `yaml:"whiteList"`
	FrozenDays    int    `yaml:"frozenDays"`
	WritenOffDays int    `yaml:"writenOffDays"`
}

type ConfigT

type ConfigT struct {
	Logger   loggeri.Config           `yaml:"logger"`
	HTTP     httpSection              `yaml:"http"`
	Redis    redisc.RedisSection      `yaml:"redis"`
	WeChat   wechat.WechatSection     `yaml:"wechat"`
	RabbitMQ rabbitmq.RabbitmqSection `yaml:"rabbitmq"`
	Tokens   []string                 `yaml:"tokens"`
	I18n     i18n.I18nSection         `yaml:"i18n"`
	Report   report.ReportSection     `yaml:"report"`
	Rdb      rdbSection               `yaml:"rdb"`
	Job      jobSection               `yaml:"job"`
	Transfer transferSection          `yaml:"transfer"`
	Monapi   monapiSection            `yaml:"monapi"`
	Judge    judgeSection             `yaml:"judge"`
	Nems     nemsSection              `yaml:"nems"`
}
var Config *ConfigT

type SessionSection

type SessionSection struct {
	CookieName     string `yaml:"cookieName"`
	CookieDomain   string `yaml:"cookieDomain"`
	SidLength      int    `yaml:"sidLength"`
	HttpOnly       bool   `yaml:"httpOnly"`
	GcInterval     int64  `yaml:"gcInterval"`
	CookieLifetime int64  `yaml:"cookieLifetime"`
	Storage        string `yaml:"storage" description:"mem|db(defualt)"`
}

Jump to

Keyboard shortcuts

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