Documentation
¶
Index ¶
Constants ¶
View Source
const ( APP_NAME = "blog" APP_FILE = "conf/app.ini" APP_PORT = 5000 APP_LOG = "data/blog.log" APP_LOG_LEVEL = "error" APP_DB = "data/blog.db" APP_PID = "data/blog.pid" APP_DEFAULT_ADMIN = "admin" APP_DEFAULT_PASSWD = "12345" )
Variables ¶
This section is empty.
Functions ¶
func RedisSetting ¶
Types ¶
type App ¶
type App struct {
PageSize int `ini:"PAGE_SIZE"`
MessageSize int `ini:"MESSAGE_SIZE"`
SortPostBy string `ini:"SORT_POST_BY"`
SortPostReverse bool `ini:"SORT_POST_REVERSE"`
SortMessageBy string `ini:"SORT_MESSAGE_BY"`
SortMessageReverse bool `ini:"SORT_MESSAGE_REVERSE"`
SortCommentBy string `ini:"SORT_COMMENT_BY"`
SortCommentReverse bool `ini:"SORT_COMMENT_REVERSE"`
UseContentAsAbs bool `ini:"USE_CONTENT_AS_ABS"`
MaxContentLength int `ini:"MAX_CONTENT_LENGTH"`
CustomEmptyAbs string `ini:"CUSTOM_EMPTY_ABS"`
FakeStaticUrl bool `ini:"FAKE_STATIC_URL"`
ZhuanLanId bool `ini:"ZHUANLAN_ID"`
JwtSecret string `ini:"JWT_SECRET"`
AppRefer string `ini:"APP_REFER"`
AppHost string `ini:"APP_HOST"`
AppDomain string `ini:"APP_DOMAIN"`
AllowIE bool `ini:"APP_ALLOW_IE"`
}
type Cfg ¶
type Cfg struct {
RunMode string
HTTPPort int
ReadTimeout time.Duration
WriteTimeout time.Duration
Cluster bool
StaticRouter bool
HideDBLog bool
PageSize int
MessageSize int
SortPostBy string
SortPostReverse bool
SortMessageBy string
SortMessageReverse bool
SortCommentBy string
SortCommentReverse bool
UseContentAsAbs bool
MaxContentLength int
CustomEmptyAbs string
FakeStaticUrl bool
ZhuanLanId bool
JwtSecret string
AppRefer string
AppHost string
AppDomain string
AllowIE bool
UvFlag bool
SimpleAuthFlag bool
CORSFlag bool
PostViewFlag bool
UseRedis bool
TryFile bool
TryFileIndex string
AdminName string
AdminPwd string
CookieMaxAge int
StopAdmin bool
DB string
MySQLType string
MySQLHost string
MySQLUserName string
MySQLPassWd string
MySQLName string
MySQLTablePrefix string
RedisHost string
Password string
MaxIdle int
MaxActive int
IdleTimeout time.Duration
Expires int
PostsTimeout int
AppName string
APPPid string
APPLog string
APPLogLevel string
APPLogFile string
APPLogEnable bool
}
Click to show internal directories.
Click to hide internal directories.