conf

package
v0.0.0-...-83adff0 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2020 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Conf = &Config{}
)

Conf global variable.

Functions

func Init

func Init() error

Init int config

Types

type Base

type Base struct {
	ShieldListTime int64
}

Base .

type Config

type Config struct {
	// base
	// log
	Log *log.Config
	// db
	DB *DB
	// redis
	Redis *Redis
	// HTTPClient
	HTTPClient *HTTPClient
	// limit
	Limit *Limit
	// geetest
	Geetest *Geetest
	// rule
	Rule map[string]*Limit
	// url
	URL *URL
	// base
	Base *Base
}

Config struct of conf.

type DB

type DB struct {
	AntiFraud *sql.Config
	PayShield *sql.Config
}

DB db config.

type Geetest

type Geetest struct {
	Count int64
}

Geetest 极验

type HTTPClient

type HTTPClient struct {
	Read  *bm.ClientConfig
	Write *bm.ClientConfig
}

HTTPClient config

type Limit

type Limit struct {
	Name             string
	SaleTimeOut      int64
	MIDCreateTimeOut int64
	MIDCreateMax     int64
	IPCreateTimeOut  int64
	IPCreateMax      int64
	IPChangeInterval int64
	IPWhiteList      []string
}

Limit 限制

type Redis

type Redis struct {
	*redis.Config
	Expire        xtime.Duration
	VerifyCdTimes xtime.Duration
}

Redis conf.

type URL

type URL struct {
	Shield string
}

URL .

Jump to

Keyboard shortcuts

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