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: 19 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 Answer

type Answer struct {
	Captcha            bool // true:only use bili captcha
	Debug              bool
	Duration           int64
	BlockedTimestamp   int64
	BaseNum            int
	BaseExtraPassNum   int
	BaseExtraNoPassNum int
	ProNum             int
	BaseExtraScore     int
	BaseExtraPassCount int
	ExtraNum           int
	MaxRetries         int
	CaptchaTokenURL    string
	CaptchaVerifyURL   string
}

Answer conf.

type App

type App struct {
	Key    string
	Secret string
}

App bilibili intranet authorization.

type Config

type Config struct {
	App        *bm.App
	Host       *Host
	Log        *log.Config
	Tracer     *trace.Config
	Infoc2     *infoc.Config
	Ecode      *ecode.Config
	BM         *bm.ServerConfig
	HTTPClient *HTTPClient
	RPCClient  *RPC
	DataBus    *DataSource
	Mysql      *sql.Config
	Memcache   *Memcache
	Redis      *Redis
	AuthN      *auth.Config
	Antispam   *antispam.Config
	Geetest    *Geetest
	Answer     *Answer
	Question   *Question
	Backoff    *netutil.BackoffConfig
	Report     *databus.Config
	AccountRPC *warden.ClientConfig
	Captcha    *bm.ClientConfig
}

Config struct of conf.

type DataSource

type DataSource struct {
	ExtraAnswer *databus.Config
}

DataSource .

type Geetest

type Geetest struct {
	PC GeetestConfig
	H5 GeetestConfig
}

Geetest geetest id & key

type GeetestConfig

type GeetestConfig struct {
	CaptchaID  string
	PrivateKEY string
}

GeetestConfig conf.

type HTTPClient

type HTTPClient struct {
	Normal *bm.ClientConfig
	Slow   *bm.ClientConfig
}

HTTPClient conf.

type Host

type Host struct {
	Geetest  string
	Account  string
	ExtraIds string
	API      string
}

Host conf.

type Memcache

type Memcache struct {
	*memcache.Config
	Expire            time.Duration
	AnswerBolckExpire time.Duration
}

Memcache conf.

type Question

type Question struct {
	// question total count tick
	TcQestTick   time.Duration
	RankQestTick time.Duration
}

Question conf.

type RPC

type RPC struct {
	Member  *rpc.ClientConfig
	Account *rpc.ClientConfig
}

RPC config

type Redis

type Redis struct {
	*redis.Config
	Expire                time.Duration
	AnsCountExpire        time.Duration
	AnsAddFlagCountExpire time.Duration
}

Redis conf.

Jump to

Keyboard shortcuts

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