setting

package
v1.4.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 6, 2018 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package setting provides ...

Index

Constants

View Source
const (
	DEV  = "dev"  // 该模式会输出 debug 等信息
	PROD = "prod" // 该模式用于生产环境
)

Variables

View Source
var (
	Conf    = new(Config)
	BlackIP = make(map[string]bool)
)

Functions

This section is empty.

Types

type Config

type Config struct {
	RunMode       string   // 运行模式
	StaticVersion int      // 当前静态文件版本
	FeedrURL      string   // superfeedr url
	HotWords      []string // 热搜词
	PingRPCs      []string // ping rpc 地址
	General       struct {
		PageNum    int    // 前端每页文章数量
		PageSize   int    // 后台每页文章数量
		StartID    int32  // 文章起始id
		DescPrefix string // 文章描述前缀
		Identifier string // 文章截取标示
		Length     int    // 文章自动截取预览长度
		Trash      int    // 回收箱文章保留时间
		Clean      int    // 清理回收箱频率
	}
	Disqus struct {
		ShortName    string
		PublicKey    string
		AccessToken  string
		PostsCount   string
		PostsList    string
		PostCreate   string
		PostApprove  string
		ThreadCreate string
		Embed        string
		Interval     int
	}
	Google struct {
		URL string
		Tid string
		V   string
		T   string
	}
	Qiniu struct {
		Bucket    string
		Domain    string
		AccessKey string
		SecretKey string
	}
	Mode struct {
		EnableHttp  bool
		HttpPort    int
		EnableHttps bool
		HttpsPort   int
		CertFile    string
		KeyFile     string
		AutoCert    bool
		Domain      string
	}
	Twitter struct {
		Card    string
		Site    string
		Image   string
		Address string
	}
	Account struct {
		Username    string // *
		Password    string // *
		Email       string
		PhoneNumber string
		Address     string
	}
	Blogger struct {
		BlogName  string
		SubTitle  string
		BeiAn     string
		BTitle    string
		Copyright string
	}
}

Jump to

Keyboard shortcuts

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