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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// Conf represents a config for spy service.
	Conf = &Config{}
)

Functions

func Init

func Init() (err error)

Init init conf.

Types

type Config

type Config struct {
	Account string
	// tracer
	Tracer *trace.Config
	// http client
	HTTPClient *bm.ClientConfig
	// db
	DB *DB
	// rpc server2
	RPCServer *rpc.ServerConfig
	// memcache
	Memcache *Memcache
	// log
	Log *log.Config
	// rpc clients
	RPC *RPC
	// biz property.
	Property *Property
	// redis
	Redis *Redis
	// databus
	DBScoreChange *databus.Config
	// qcloud
	Qcloud *Qcloud
	// bm
	BM *bm.ServerConfig
	// grpc
	GRPC *warden.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
	SecurityLoginURL    string
	TelInfoByMidURL     string
	ProfileInfoByMidURL string
	UnicomGiftStateURL  string
	LoadEventTick       xtime.Duration
	DoubleCheckLevel    int32
	ConfigLoadTick      xtime.Duration
	UserInfoShard       int64
	HistoryShard        int64
	AutoBlockSwitch     bool
	Score               *struct {
		BaseInit  int8
		EventInit int8
	}
	Punishment *struct {
		ScoreThreshold int8
		Times          int8
	}
	Event *struct {
		ServiceName           string
		InitEventID           int64
		BindMailAndTelLowRisk string
		BindMailOnly          string
		BindNothing           string
		BindTelLowRiskOnly    string
		BindTelMediumRisk     string
		BindTelHighRisk       string
		BindTelUnknownRisk    string

		BindTelLowRiskAndIdenAuth       string
		BindTelLowRiskAndIdenUnauth     string
		BindTelUnknownRiskAndIdenAuth   string
		BindTelMediumRiskAndIdenAuth    string
		BindTelUnknownRiskAndIdenUnauth string
		BindTelMediumRiskAndIdenUnauth  string
		BindMailAndIdenUnknown          string
		BindTelHighRiskAndIdenAuth      string
		BindNothingV2                   string
		BindNothingAndIdenAuth          string
		BindTelHighRiskAndIdenUnauth    string
	}
	Block *struct {
		CycleTimes int64 // unit per seconds
	}
	White *struct {
		Tels []struct {
			From int64 // <= from
			To   int64 // >= to
		}
	}
}

Property config for biz logic.

type Qcloud

type Qcloud struct {
	Path      string
	Region    string
	SecretID  string
	SecretKey string
	Charset   string
	BaseURL   string
}

Qcloud def.

type RPC

type RPC struct {
	Account *rpc.ClientConfig
}

RPC clients config.

type Redis

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

Redis redis.

Jump to

Keyboard shortcuts

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