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: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// Conf config
	Conf = &Config{}
)

Functions

func Init

func Init() error

Init int config

Types

type Config

type Config struct {
	// base
	// db
	DB *DB
	// spy rpc client
	SpyRPC     *rpc.ClientConfig
	AccountRPC *rpc.ClientConfig
	// memcache
	Memcache *Memcache
	// log
	Log *log.Config
	// customized property
	Property   *Property
	HTTPServer *bm.ServerConfig
}

Config def.

type DB

type DB struct {
	Spy *sql.Config
}

DB config.

type Memcache

type Memcache struct {
	User       *memcache.Config
	UserExpire time.Duration
}

Memcache config.

type Property

type Property struct {
	TelValidateURL  string
	BlockAccountURL string
	UserInfoShard   int64
	HistoryShard    int64
	LoadEventTick   time.Duration
	Score           *struct {
		BaseInit  int8
		EventInit int8
	}
	Punishment *struct {
		ScoreThreshold int8
		Times          int8
	}
	Event *struct {
		ServiceName           string
		BindMailAndTelLowRisk string
		BindMailOnly          string
		BindNothing           string
		BindTelLowRiskOnly    string
		BindTelMediumRisk     string
		BindTelHighRisk       string
		BindTelUnknownRisk    string
	}
	// activity events
	ActivityEvents map[int32]struct{}
}

Property config for biz logic.

Jump to

Keyboard shortcuts

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