Documentation
¶
Index ¶
Constants ¶
View Source
const ( LoadPath = "./conf/config.yml" StaticUploadPath = "static/image/" StaticVoicePath = "static/voice/" )
View Source
const ( Success = 2000 //成功 Forbidden = 4003 // 禁止访问 Failed = 5000 // 失败 ServerError = 5003 // 5003服务器异常 )
View Source
const ( ScoreFoodLook = 1 ScoreFoodComment = 5 ScoreFoodCollect = 20 ScoreDiseaseLook = 1 ScoreDiseaseComment = 5 ScoreDiseaseCollect = 15 ScoreUserLogin = 10 ScoreUserLook = 1 ScoreUserComment = 3 )
View Source
const ( LimitUserLoginAwardDay = 1 LimitUserLookAwardDay = 50 LimitUserCommentAwardDay = 30 )
View Source
const (
DurationUserScore = time.Hour * 24
)
View Source
const (
RecNum = 3
)
Variables ¶
This section is empty.
Functions ¶
func GetCurTime ¶
func GetCurTime() (t string)
func IsOnlineENV ¶
func IsOnlineENV() bool
func IsStagingENV ¶
func IsStagingENV() bool
func ScanStruct ¶
Types ¶
type YamlFile ¶
type YamlFile struct { Mysql struct { Database string `yaml:"Database"` } `yaml:"Mysql"` Redis struct { Addr string `yaml:"Addr"` Password string `yaml:"Password"` DbToken int `yaml:"DbToken"` } `yaml:"Redis"` Wechat struct { AppID string `yaml:"AppID"` AppSecret string `yaml:"AppSecret"` } `yaml:"Wechat"` Ai struct { ApiKey string `yaml:"ApiKey"` SecretKey string `yaml:"SecretKey"` } `yaml:"Ai"` }
var (
ConfigInstance *YamlFile
)
func InitConfig ¶
Click to show internal directories.
Click to hide internal directories.