Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
二次元的罪恶王冠
beego
提交
01012fa8
B
beego
项目概览
二次元的罪恶王冠
/
beego
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
B
beego
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
01012fa8
编写于
1月 08, 2016
作者:
A
astaxie
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
admin configure
上级
91675879
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
57 addition
and
4 deletion
+57
-4
admin.go
admin.go
+53
-1
beego.go
beego.go
+1
-1
config.go
config.go
+3
-2
未找到文件。
admin.go
浏览文件 @
01012fa8
...
...
@@ -89,11 +89,63 @@ func listConf(rw http.ResponseWriter, r *http.Request) {
data
:=
make
(
map
[
interface
{}]
interface
{})
switch
command
{
case
"conf"
:
m
:=
make
(
map
[
string
]
interface
{})
m
[
"AppConfigPath"
]
=
AppConfigPath
m
[
"AppConfigProvider"
]
=
AppConfigProvider
m
[
"BConfig.AppName"
]
=
BConfig
.
AppName
m
[
"BConfig.RunMode"
]
=
BConfig
.
RunMode
m
[
"BConfig.RouterCaseSensitive"
]
=
BConfig
.
RouterCaseSensitive
m
[
"BConfig.ServerName"
]
=
BConfig
.
ServerName
m
[
"BConfig.RecoverPanic"
]
=
BConfig
.
RecoverPanic
m
[
"BConfig.CopyRequestBody"
]
=
BConfig
.
CopyRequestBody
m
[
"BConfig.EnableGzip"
]
=
BConfig
.
EnableGzip
m
[
"BConfig.MaxMemory"
]
=
BConfig
.
MaxMemory
m
[
"BConfig.EnableErrorsShow"
]
=
BConfig
.
EnableErrorsShow
m
[
"BConfig.Listen.Graceful"
]
=
BConfig
.
Listen
.
Graceful
m
[
"BConfig.Listen.ServerTimeOut"
]
=
BConfig
.
Listen
.
ServerTimeOut
m
[
"BConfig.Listen.ListenTCP4"
]
=
BConfig
.
Listen
.
ListenTCP4
m
[
"BConfig.Listen.HTTPEnable"
]
=
BConfig
.
Listen
.
HTTPEnable
m
[
"BConfig.Listen.HTTPAddr"
]
=
BConfig
.
Listen
.
HTTPAddr
m
[
"BConfig.Listen.HTTPPort"
]
=
BConfig
.
Listen
.
HTTPPort
m
[
"BConfig.Listen.HTTPSEnable"
]
=
BConfig
.
Listen
.
HTTPSEnable
m
[
"BConfig.Listen.HTTPSAddr"
]
=
BConfig
.
Listen
.
HTTPSAddr
m
[
"BConfig.Listen.HTTPSPort"
]
=
BConfig
.
Listen
.
HTTPSPort
m
[
"BConfig.Listen.HTTPSCertFile"
]
=
BConfig
.
Listen
.
HTTPSCertFile
m
[
"BConfig.Listen.HTTPSKeyFile"
]
=
BConfig
.
Listen
.
HTTPSKeyFile
m
[
"BConfig.Listen.AdminEnable"
]
=
BConfig
.
Listen
.
AdminEnable
m
[
"BConfig.Listen.AdminAddr"
]
=
BConfig
.
Listen
.
AdminAddr
m
[
"BConfig.Listen.AdminPort"
]
=
BConfig
.
Listen
.
AdminPort
m
[
"BConfig.Listen.EnableFcgi"
]
=
BConfig
.
Listen
.
EnableFcgi
m
[
"BConfig.Listen.EnableStdIo"
]
=
BConfig
.
Listen
.
EnableStdIo
m
[
"BConfig.WebConfig.AutoRender"
]
=
BConfig
.
WebConfig
.
AutoRender
m
[
"BConfig.WebConfig.EnableDocs"
]
=
BConfig
.
WebConfig
.
EnableDocs
m
[
"BConfig.WebConfig.FlashName"
]
=
BConfig
.
WebConfig
.
FlashName
m
[
"BConfig.WebConfig.FlashSeperator"
]
=
BConfig
.
WebConfig
.
FlashSeperator
m
[
"BConfig.WebConfig.DirectoryIndex"
]
=
BConfig
.
WebConfig
.
DirectoryIndex
m
[
"BConfig.WebConfig.StaticDir"
]
=
BConfig
.
WebConfig
.
StaticDir
m
[
"BConfig.WebConfig.StaticExtensionsToGzip"
]
=
BConfig
.
WebConfig
.
StaticExtensionsToGzip
m
[
"BConfig.WebConfig.TemplateLeft"
]
=
BConfig
.
WebConfig
.
TemplateLeft
m
[
"BConfig.WebConfig.TemplateRight"
]
=
BConfig
.
WebConfig
.
TemplateRight
m
[
"BConfig.WebConfig.ViewsPath"
]
=
BConfig
.
WebConfig
.
ViewsPath
m
[
"BConfig.WebConfig.EnableXSRF"
]
=
BConfig
.
WebConfig
.
EnableXSRF
m
[
"BConfig.WebConfig.XSRFKEY"
]
=
BConfig
.
WebConfig
.
XSRFKEY
m
[
"BConfig.WebConfig.XSRFExpire"
]
=
BConfig
.
WebConfig
.
XSRFExpire
m
[
"BConfig.WebConfig.Session.SessionOn"
]
=
BConfig
.
WebConfig
.
Session
.
SessionOn
m
[
"BConfig.WebConfig.Session.SessionProvider"
]
=
BConfig
.
WebConfig
.
Session
.
SessionProvider
m
[
"BConfig.WebConfig.Session.SessionName"
]
=
BConfig
.
WebConfig
.
Session
.
SessionName
m
[
"BConfig.WebConfig.Session.SessionGCMaxLifetime"
]
=
BConfig
.
WebConfig
.
Session
.
SessionGCMaxLifetime
m
[
"BConfig.WebConfig.Session.SessionProviderConfig"
]
=
BConfig
.
WebConfig
.
Session
.
SessionProviderConfig
m
[
"BConfig.WebConfig.Session.SessionCookieLifeTime"
]
=
BConfig
.
WebConfig
.
Session
.
SessionCookieLifeTime
m
[
"BConfig.WebConfig.Session.SessionAutoSetCookie"
]
=
BConfig
.
WebConfig
.
Session
.
SessionAutoSetCookie
m
[
"BConfig.WebConfig.Session.SessionDomain"
]
=
BConfig
.
WebConfig
.
Session
.
SessionDomain
m
[
"BConfig.Log.AccessLogs"
]
=
BConfig
.
Log
.
AccessLogs
m
[
"BConfig.Log.FileLineNum"
]
=
BConfig
.
Log
.
FileLineNum
m
[
"BConfig.Log.Outputs"
]
=
BConfig
.
Log
.
Outputs
tmpl
:=
template
.
Must
(
template
.
New
(
"dashboard"
)
.
Parse
(
dashboardTpl
))
tmpl
=
template
.
Must
(
tmpl
.
Parse
(
configTpl
))
tmpl
=
template
.
Must
(
tmpl
.
Parse
(
defaultScriptsTpl
))
data
[
"Content"
]
=
BConfig
data
[
"Content"
]
=
m
tmpl
.
Execute
(
rw
,
data
)
...
...
beego.go
浏览文件 @
01012fa8
...
...
@@ -74,7 +74,7 @@ func initBeforeHTTPRun() {
panic
(
err
)
}
//init log
for
adaptor
,
config
:=
range
BConfig
.
Log
.
Output
{
for
adaptor
,
config
:=
range
BConfig
.
Log
.
Output
s
{
err
=
BeeLogger
.
SetLogger
(
adaptor
,
config
)
if
err
!=
nil
{
fmt
.
Printf
(
"%s with the config `%s` got err:%s
\n
"
,
adaptor
,
config
,
err
)
...
...
config.go
浏览文件 @
01012fa8
...
...
@@ -90,7 +90,7 @@ type SessionConfig struct {
type
LogConfig
struct
{
AccessLogs
bool
FileLineNum
bool
Output
map
[
string
]
string
// Store Adaptor : config
Output
s
map
[
string
]
string
// Store Adaptor : config
}
var
(
...
...
@@ -165,7 +165,7 @@ func init() {
Log
:
LogConfig
{
AccessLogs
:
false
,
FileLineNum
:
true
,
Output
:
map
[
string
]
string
{
"console"
:
""
},
Output
s
:
map
[
string
]
string
{
"console"
:
""
},
},
}
ParseConfig
()
...
...
@@ -215,6 +215,7 @@ func ParseConfig() (err error) {
BConfig
.
Listen
.
AdminAddr
=
AppConfig
.
DefaultString
(
"AdminHTTPAddr"
,
BConfig
.
Listen
.
AdminAddr
)
BConfig
.
Listen
.
AdminPort
=
AppConfig
.
DefaultInt
(
"AdminHTTPPort"
,
BConfig
.
Listen
.
AdminPort
)
BConfig
.
Listen
.
EnableFcgi
=
AppConfig
.
DefaultBool
(
"EnableFcgi"
,
BConfig
.
Listen
.
EnableFcgi
)
BConfig
.
Listen
.
EnableStdIo
=
AppConfig
.
DefaultBool
(
"EnableStdIo"
,
BConfig
.
Listen
.
EnableStdIo
)
BConfig
.
Listen
.
ServerTimeOut
=
AppConfig
.
DefaultInt64
(
"HTTPServerTimeOut"
,
BConfig
.
Listen
.
ServerTimeOut
)
BConfig
.
WebConfig
.
AutoRender
=
AppConfig
.
DefaultBool
(
"AutoRender"
,
BConfig
.
WebConfig
.
AutoRender
)
BConfig
.
WebConfig
.
ViewsPath
=
AppConfig
.
DefaultString
(
"ViewsPath"
,
BConfig
.
WebConfig
.
ViewsPath
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录