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: 15 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 init conf

Types

type BFS

type BFS struct {
	Bucket string
	Key    string
	Secret string
}

BFS bfs config

type Config

type Config struct {
	Log      *log.Config
	BM       *bm.ServerConfig
	Tracer   *trace.Config
	Memcache *MemcacheConfig
	MCNorm   *orm.Config
	Ecode    *ecode.Config
	BFS      *BFS
	Host     *Host
	// http client
	HTTPClient *bm.ClientConfig
	Property   *Property
	Other      *OtherConfig
	GRPCClient *GRPCClient
	RankCache  *GCacheConfig
	//upload Antispam
	UploadAntispam *antispam.Config
	DataClientConf *datacenter.ClientConfig
}

Config .

func (*Config) AfterLoad

func (s *Config) AfterLoad()

AfterLoad .

type GCacheConfig

type GCacheConfig struct {
	Size                    int           // gcache
	ExpireTime              time.Duration // key expire time
	RecommendPoolExpireTime time.Duration
}

GCacheConfig gcache

type GRPCClient

type GRPCClient struct {
	Tag     *warden.ClientConfig
	Account *warden.ClientConfig
	Member  *warden.ClientConfig
	Archive *warden.ClientConfig
}

GRPCClient .

type Host

type Host struct {
	Bfs     string
	Msg     string
	Videoup string
	API     string
}

Host host config .

type MemcacheConfig

type MemcacheConfig struct {
	memcache.Config
	McnSignCacheExpire time.Duration
	McnDataCacheExpire time.Duration
}

MemcacheConfig .

type OtherConfig

type OtherConfig struct {
	Debug                       bool
	PublicationPriceChangeLimit time.Duration
	WhiteListMid                []int64 // 超级查看权限
	WhiteListMidMap             map[int64]struct{}
}

OtherConfig some config.

func (*OtherConfig) IsWhiteList

func (s *OtherConfig) IsWhiteList(mid int64) bool

IsWhiteList check is in white list

type Property

type Property struct {
	MSG []*model.MSG
}

Property .

Jump to

Keyboard shortcuts

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