improve the functions related to commenting on images

This commit is contained in:
landaiqing
2024-09-23 00:53:43 +08:00
parent 8d5d918a7d
commit 7aae53e533
32 changed files with 1004 additions and 86 deletions

18
config/conf_mongodb.go Normal file
View File

@@ -0,0 +1,18 @@
package config
import "strconv"
type MongoDB struct {
Host string `yaml:"host"`
Port int `yaml:"port"`
AuthSource string `yaml:"auth-source"`
DB string `yaml:"db"`
User string `yaml:"user"`
Password string `yaml:"password"`
MaxOpenConn int `yaml:"max-open-conn"`
MaxIdleConn int `yaml:"max-idle-conn"`
}
func (m *MongoDB) MongoDsn() string {
return "mongodb://" + m.Host + ":" + strconv.Itoa(m.Port)
}