forked from UlricQin/beego-blog
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cfg.go
35 lines (32 loc) · 882 Bytes
/
cfg.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
package g
import (
"github.com/qiniu/api/conf"
)
var (
RootEmail string
RootName string
RootPass string
RootPortrait string
BlogTitle string
BlogResume string
BlogLogo string
QiniuAccessKey string
QiniuSecretKey string
QiniuScope string
UseQiniu bool
)
func initCfg() {
RootName = Cfg.String("root_name")
RootEmail = Cfg.String("root_email")
RootPass = Cfg.String("root_pass")
RootPortrait = Cfg.String("root_portrait")
BlogTitle = Cfg.String("blog_title")
BlogResume = Cfg.String("blog_resume")
BlogLogo = Cfg.String("blog_logo")
QiniuAccessKey = Cfg.String("qiniu_access_key")
QiniuSecretKey = Cfg.String("qiniu_secret_key")
QiniuScope = Cfg.String("qiniu_scope")
UseQiniu = QiniuAccessKey != "" && QiniuSecretKey != "" && QiniuScope != ""
conf.ACCESS_KEY = QiniuAccessKey
conf.SECRET_KEY = QiniuSecretKey
}