|
|
@ -166,7 +166,7 @@ type sqlite3Conf struct {
|
|
|
|
Path string
|
|
|
|
Path string
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
type objectStorageS struct {
|
|
|
|
type objectStorageConf struct {
|
|
|
|
RetainInDays int
|
|
|
|
RetainInDays int
|
|
|
|
TempDir string
|
|
|
|
TempDir string
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -296,6 +296,35 @@ func (s *databaseConf) logLevel() logger.LogLevel {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
func (s *databaseConf) TableNames() (res TableNameMap) {
|
|
|
|
|
|
|
|
tableNames := []string{
|
|
|
|
|
|
|
|
TableAnouncement,
|
|
|
|
|
|
|
|
TableAnouncementContent,
|
|
|
|
|
|
|
|
TableAttachment,
|
|
|
|
|
|
|
|
TableCaptcha,
|
|
|
|
|
|
|
|
TableComment,
|
|
|
|
|
|
|
|
TableCommentContent,
|
|
|
|
|
|
|
|
TableCommentReply,
|
|
|
|
|
|
|
|
TableContact,
|
|
|
|
|
|
|
|
TableContactGroup,
|
|
|
|
|
|
|
|
TableMessage,
|
|
|
|
|
|
|
|
TablePost,
|
|
|
|
|
|
|
|
TablePostAttachmentBill,
|
|
|
|
|
|
|
|
TablePostCollection,
|
|
|
|
|
|
|
|
TablePostContent,
|
|
|
|
|
|
|
|
TablePostStar,
|
|
|
|
|
|
|
|
TableTag,
|
|
|
|
|
|
|
|
TableUser,
|
|
|
|
|
|
|
|
TableWalletRecharge,
|
|
|
|
|
|
|
|
TableWalletStatement,
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
res = make(TableNameMap, len(tableNames))
|
|
|
|
|
|
|
|
for _, name := range tableNames {
|
|
|
|
|
|
|
|
res[name] = s.TablePrefix + name
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
func (s *loggerConf) logLevel() logrus.Level {
|
|
|
|
func (s *loggerConf) logLevel() logrus.Level {
|
|
|
|
switch strings.ToLower(s.Level) {
|
|
|
|
switch strings.ToLower(s.Level) {
|
|
|
|
case "panic":
|
|
|
|
case "panic":
|
|
|
@ -343,7 +372,7 @@ func (s *loggerMeiliConf) maxLogBuffer() int {
|
|
|
|
return s.MaxLogBuffer
|
|
|
|
return s.MaxLogBuffer
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
func (s *objectStorageS) TempDirSlash() string {
|
|
|
|
func (s *objectStorageConf) TempDirSlash() string {
|
|
|
|
return strings.Trim(s.TempDir, " /") + "/"
|
|
|
|
return strings.Trim(s.TempDir, " /") + "/"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|