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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// Conf of config
	Conf = &Config{}
)

Functions

func Init

func Init() error

Init int config

Types

type Abnormal

type Abnormal struct {
	CriticalCid  int64 // 12780000, critical cid for transcoding
	AbnormHours  int   // ugc abnormal cid interval hour
	ReloadFre    xtime.Duration
	ExportTitles []string // export titles
}

Abnormal cid export def

type AuditConsult

type AuditConsult struct {
	LikeLimit  int
	UnshelveNb int
	MatchPS    int64
}

AuditConsult related cfg

type Bfs

type Bfs struct {
	Key     string
	Secret  string
	Host    string
	Timeout int
	Bucket  string
}

Bfs struct

type Cfg

type Cfg struct {
	Playpath      string // playurl
	AuditRSize    int    // page size for audit result checking
	PlayurlAPI    string // pgc playurl api
	SearInterMax  int
	IntervLimit   int
	PGCTypes      []string          // pgc types that need to filter archives
	PgcNames      map[string]string // pgc category name in CN
	ModIntMaxSize int               // ModIntMaxSize module intervene max size
	TypesLoad     xtime.Duration    // reloading type duratio
	UPlayurlAPI   string            // ugc playurl api
	SupportCat    *SupportCat
	MangoErr      string // mango error indication message
	LoadSnFre     xtime.Duration
	RefLabel      *RefLabel     // refresh label original data frequency
	AuditConsult  *AuditConsult // audit consult cfg
	Hosts         *Hosts
	Abnormal      *Abnormal // abnormal cid export related cfg
	EsIdx         *EsIdx    // es index cfg
}

Cfg def

type Config

type Config struct {
	// base
	// http
	HTTPServer *bm.ServerConfig
	// auth
	Auth *permit.Config
	// db
	ORM *orm.Config
	// dbshow
	ORMShow *orm.Config
	// log
	Log *log.Config
	// tracer
	Tracer *trace.Config
	// httpsearch
	HTTPSearch *HTTPSearch
	// Cfg
	Cfg *Cfg
	// HTTPClient .
	HTTPClient *bm.ClientConfig
	// URLConf
	URLConf *URLConf
	// YSTParam
	YSTParam *YSTParam
	// Bfs
	Bfs *Bfs
	// grpc
	ArcClient *warden.ClientConfig
	AccClient *warden.ClientConfig
	// Ecode Cfg
	Ecode *ecode.Config
	//mc
	Memcache *Memcache
}

Config def.

type EsCfg

type EsCfg struct {
	Business string
	Index    string
}

EsCfg def.

type EsIdx

type EsIdx struct {
	UgcIdx *EsCfg
}

EsIdx def.

type HTTPSearch

type HTTPSearch struct {
	*bm.ClientConfig
	FullURL string
}

HTTPSearch http client of search

type Hosts

type Hosts struct {
	ESUgc   string // ESUgc api
	Manager string // manager host
}

Hosts def.

type Memcache

type Memcache struct {
	*memcache.Config
	CmsExpire xtime.Duration
}

Memcache memcache.

type RefLabel

type RefLabel struct {
	Fre      xtime.Duration
	PgcAPI   string // pgc api host
	UgcType  string
	UgcTime  string
	AllValue string
	AllName  string
}

RefLabel def.

type SupportCat

type SupportCat struct {
	PGCTypes  []int32
	UGCTypes  []int32
	ReloadFre xtime.Duration
}

SupportCat means the pgc&ugc types that we support to fill the modules

type URLConf

type URLConf struct {
	GetRemotePanelUrl string
	SyncPanelUrl      string
}

URLConf url conf

type YSTParam

type YSTParam struct {
	QueryPanelType  string
	InsertPanelType string
	Source          string
	Insert          string
	Update          string
}

YSTParam yst config param

Jump to

Keyboard shortcuts

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