✨ improve the functions related to commenting on images
This commit is contained in:
18
config/conf_mongodb.go
Normal file
18
config/conf_mongodb.go
Normal 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)
|
||||
}
|
Reference in New Issue
Block a user