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 config
	Conf = &Config{}
	// App setting
	App = &AppSetting{}
	// Filter .
	Filter = &UploadFilter{}
)

Functions

func Init

func Init() (err error)

Init init conf

Types

type AppSetting

type AppSetting map[string]interface{}

AppSetting .

func (*AppSetting) Set

func (a *AppSetting) Set(text string) error

Set .

type Comment

type Comment struct {
	Type       int64
	DebugID    int64
	CloseRead  bool
	CloseWrite bool
}

Comment 评论配置

type Config

type Config struct {
	Log        *log.Config
	BM         *bm.ServerConfig
	Verify     *verify.Config
	Auth       *auth.Config
	Tracer     *trace.Config
	Redis      *redis.Config
	MySQL      *sql.Config
	DMMySQL    *sql.Config
	Ecode      *ecode.Config
	HTTPClient *HTTPClient
	GRPCClient map[string]*GRPCConf
	AntiSpam   map[string]*antispam.Config
	Tmap       map[string]string
	URLs       map[string]string
	Comment    *Comment
	Infoc      *infoc.Config
	Search     *Search
	Notices    []*v1.NoticeOverview
	Upload     *Upload
}

Config .

func (*Config) Set

func (c *Config) Set(text string) error

Set .

type GRPCConf

type GRPCConf struct {
	WardenConf *warden.ClientConfig
	Addr       string
}

GRPCConf .

type HTTPClient

type HTTPClient struct {
	Normal *bm.ClientConfig
	Slow   *bm.ClientConfig
}

HTTPClient conf

type Search struct {
	Host string
}

Search 搜索配置

type Upload

type Upload struct {
	HTTPSchema string
}

Upload ..

type UploadFilter

type UploadFilter struct {
	MidFilter *UploadMidFilter
}

UploadFilter 创作中心上传过滤

func (*UploadFilter) Set

func (uf *UploadFilter) Set(text string) error

Set .

type UploadMidFilter

type UploadMidFilter struct {
	White []int64
	Black []int64
}

UploadMidFilter 创作中心上传用户mid过滤

func (*UploadMidFilter) Set

func (umf *UploadMidFilter) Set(text string) error

Set .

Jump to

Keyboard shortcuts

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