conf

package
v0.0.0-...-3f42f3c Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	//站点的对外目录
	// StaticAssets is the root directory for public assets like images, css, js.
	StaticAssets = "./assets/"
	StaticPublic = "./public/"

	// Favicon is the relative 9to the "StaticAssets") favicon path for our app.
	Favicon = "favicon.ico"

	//SysTimeform 时间
	SysTimeform = "2006-01-02 15:04:05"

	//SysTimeformShort 时间
	SysTimeformShort = "2006-01-02"
	////////////////////TYPE/////////////////////
	//站点配置ID
	SITE_ID      = 10007 //站点配置ID
	ADMIN_ROLE   = 420   //角色ID
	MEMBER_GROUP = 400   //用户组

	//博客模块ID
	TYPE_ID = 10006 //博客模块ID
	//原创
	ORIGINAL = 10003 //原创
	//栏目 博客分类属性 栏目ID
	TYPE_CAT = 10001 //栏目 博客分类属性 栏目ID
	//文章
	TYPE_ARTICLE = 0 //文章
	//是否阅读
	READ_FINISH = 10016 //已看
	READ_NOW    = 10015 //在看
	READ_NOT    = 10014 //未看
	///////////////////////////////////////////
	APP_CSDN = 10011 //csdn
	//////////
	ADMIN_YES = 301 //后台
	ADMIN_NO  = 302 //前台
	//
	MODULE_ID_WORK_OTHER = 10018 //技术之外文章 生活
	MODULE_ID_WORK       = 10019 //技术
	//
	TYPE_FROM           = 600 //表单标签
	TYPE_INPUT_RADIO    = 603 //单选框
	TYPE_INPUT_TEXTAREA = 604 //多行文本框
	//
	APP_API = 10023 //接口
)

Variables

View Source
var (
	//IndexPath 前台模板路径
	MubanIndexPath = "fronted"

	//AdminPath 后台模板路径
	MubanAdminPath = "backend"

	//PcPath PC模板路径
	PcPath = "pc"

	//WapPath WAP模板路径
	WapPath = "wap"

	//AutoPath AUTO模板路径
	AutoPath = "auto"

	//RunningCrontabService 是否需要启动全局计划任务服务
	RunningCrontabService = false

	//SysTimeLocation 中国时区
	SysTimeLocation, _ = time.LoadLocation("Asia/Chongqing")

	//SignSecret ObjSalesign 签名密钥
	SignSecret = []byte("0123456789abcdef")

	//CookieSecret cookie中的加密验证密钥
	CookieSecret = "waomao.com_login_276566565"

	// 请求日志记录
	CustomLogger = logger.New(logger.Config{

		Status: true,

		IP: true,

		Method: true,

		Path: true,

		Query: true,

		MessageContextKeys: []string{"logger_message"},

		MessageHeaderKeys: []string{"User-Agent"},
	})
)

Functions

func ReloadConfig

func ReloadConfig()

Types

type Company

type Company struct {
	Name   string
	Detail detail
}

type Config

type Config struct {
	Title         string
	Runmode       string
	CustomLogger  bool
	Password_salt string
	Aes_key       string
	Stage         map[string]stage `toml:"stage"`
	CookieSession cookieSession
	App           app
	Webvar        webvar
	DB            map[string]mysql `toml:"mysql"`
	Redis         map[string]redis
	Releases      releases
	Company       Company
	Song          []song
}

func Configs

func Configs() *Config

Jump to

Keyboard shortcuts

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