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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ConfPath string
	Conf     = &Config{}
)

Conf info.

Functions

func Init

func Init() (err error)

Init conf.

Types

type AcaRecommend

type AcaRecommend struct {
	academy.Recommend
}

AcaRecommend for h5 rec conf

type Academy

type Academy struct {
	academy.H5Conf
}

Academy for academy h5 conf

type AppIcon

type AppIcon struct {
	CameraInput *appMdl.Icon `json:"camera_input"`
	CameraCoo   *appMdl.Icon `json:"camera_coo"`
}

AppIcon str

type BFS

type BFS struct {
	Timeout     time.Duration
	MaxFileSize int
	Bucket      string
	URL         string
	Method      string
	Key         string
	Secret      string
}

BFS bfs config

type Coefficient

type Coefficient struct {
	ActHeat float64
}

Coefficient str

type Config

type Config struct {
	// db
	DB *DB
	// base
	// ecode
	Ecode *ecode.Config
	// log
	Log *log.Config
	// app
	App *bm.App
	// HTTPClient
	HTTPClient *HTTPClient
	// BM
	BM *HTTPServers
	// rpc client2
	ArchiveRPC  *rpc.ClientConfig
	ArticleRPC  *rpc.ClientConfig
	ResourceRPC *rpc.ClientConfig
	RelationRPC *rpc.ClientConfig
	UPRPC       *rpc.ClientConfig
	SubRPC      *rpc.ClientConfig
	// mc
	Memcache *Memcache

	// redis
	Redis *Redis
	// tracer
	Tracer *trace.Config
	//nhbase
	HBase    *HBaseConfig
	HBaseOld *HBaseConfig
	// white list
	WhiteAccessKey string
	WhiteMid       int64
	// host
	Host   *Host
	H5Page *H5Page
	// geetest
	Geetest *Geetest
	// whitelist
	Whitelist *Whitelist
	// ArchStatus
	ArchStatus     map[string]string
	RouterAntispam *antispam.Config
	DmAntispam     *antispam.Config
	// BFS
	BFS       *BFS
	AppealTag int64
	// databus sub
	UserInfoSub *databus.Config
	TaskPub     *databus.Config
	// WaterMark
	WaterMark   *WaterMark
	Game        *Game
	Growup      *Growup
	StatCacheOn bool
	AppIcon     *AppIcon
	UgcPay      *UgcPay
	//academy
	Coefficient *Coefficient
	// academy
	Academy      *Academy
	AcaRecommend *AcaRecommend
	//ManagerReport 行为日志平台
	ManagerReport *databus.Config
	// rpc server
	WardenServer *warden.ServerConfig
	WardenClient *warden.ClientConfig
	CoinClient   *warden.ClientConfig
	AccClient    *warden.ClientConfig
	UpClient     *warden.ClientConfig
	// task condition
	TaskCondition *TaskCondition

	//联合投稿配置
	StaffConf *StaffConf
	// honor weekly degrade switch
	HonorDegradeSwitch bool
}

Config struct.

func (*Config) StatDesc

func (c *Config) StatDesc(state int) (desc string)

StatDesc define

type DB

type DB struct {
	// archive db
	Creative *sql.Config
	Archive  *sql.Config
}

DB conf.

type Game

type Game struct {
	OpenHost string
	App      *bm.App
}

Game str Conf

type Geetest

type Geetest struct {
	CaptchaID   string
	MCaptchaID  string
	PrivateKEY  string
	MPrivateKEY string
}

Geetest geetest id & key

type Growup

type Growup struct {
	LimitFanCnt     int64 // LimitFanCnt 一万粉
	LimitTotalClick int64 // LimitTotalClick 五十万点击量
}

Growup str

type H5Page

type H5Page struct {
	FAQVideoEditor  string
	CreativeCollege string
	HotAct          string
	Draft           string
	Passport        string
	Mission         string
	Cooperate       string
}

H5Page conf.

type HBaseConfig

type HBaseConfig struct {
	*hbase.Config
	WriteTimeout time.Duration
	ReadTimeout  time.Duration
}

HBaseConfig for new hbase client.

type HTTPClient

type HTTPClient struct {
	Normal   *bm.ClientConfig
	Slow     *bm.ClientConfig
	UpMng    *bm.ClientConfig
	Fast     *bm.ClientConfig
	Chaodian *bm.ClientConfig
}

HTTPClient conf.

type HTTPServers

type HTTPServers struct {
	Outer *bm.ServerConfig
	Local *bm.ServerConfig
}

HTTPServers Http Servers

type Host

type Host struct {
	Passport   string
	Archive    string
	Search     string
	API        string
	Data       string
	Member     string
	Act        string
	Activity   string
	Videoup    string
	Tag        string
	Geetest    string
	Account    string
	UpMng      string
	Elec       string
	Live       string
	Monitor    string
	Coverrec   string
	Growup     string
	Matsuri    string
	ArcTip     string
	Message    string
	HelpAPI    string
	MainSearch string
	Dynamic    string
	Mall       string //会员购
	BPay       string //B币券
	Pendant    string //挂件
	BigMember  string //大会员
	Profit     string //激励计划
	Notify     string //消息通知
	Chaodian   string //超电
}

Host conf.

type Memcache

type Memcache struct {
	Data struct {
		*memcache.Config
		DataExpire  time.Duration
		IndexExpire time.Duration
	}
	Archive struct {
		*memcache.Config
		TplExpire time.Duration
	}
	Honor struct {
		*memcache.Config
		HonorExpire time.Duration
		ClickExpire time.Duration
	}
}

Memcache conf.

type Redis

type Redis struct {
	Antispam *struct {
		*redis.Config
		Expire time.Duration
	}
	Cover *struct {
		*redis.Config
		Expire time.Duration
	}
}

Redis conf.

type StaffConf

type StaffConf struct {
	IsGray   bool             `json:"is_gray"`
	TypeList []*StaffTypeConf `json:"typelist"`
}

StaffConf 联合投稿配置

type StaffTypeConf

type StaffTypeConf struct {
	TypeID   int16 `json:"typeid"`
	MaxStaff int   `json:"max_staff"`
}

StaffTypeConf 联合投稿的分区配置

type TaskCondition

type TaskCondition struct {
	Fans              int64
	ReceiveMsg        string
	ReceiveMsgPendant string
	WhiteSwitch       bool
	AppIndexSwitch    bool
}

TaskCondition task condition

type Thrift

type Thrift struct {
	Addr                     string
	Idle                     int
	DialTimeout, ReadTimeout time.Duration
}

Thrift conf.

type UgcPay

type UgcPay struct {
	ProtocolID      string
	AllowDeleteDays int
	AllowEditDays   int
}

UgcPay str

type WaterMark

type WaterMark struct {
	UnameMark string
	UIDMark   string
	SaveImg   string
	FontFile  string
	FontSize  int
	Consume   bool
}

WaterMark config

type Whitelist

type Whitelist struct {
	DataMids          []int64
	ArcMids           []int64
	ForbidVideoupMids []int64
}

Whitelist str

Jump to

Keyboard shortcuts

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