2023-03-11 10:17:30 +00:00
|
|
|
package config
|
|
|
|
|
|
|
|
type Config struct {
|
2023-03-11 11:30:12 +00:00
|
|
|
MongoURL string
|
|
|
|
DBName string
|
|
|
|
ChatsCollectionName string
|
|
|
|
WorkoutsCollectionName string
|
2023-03-12 06:53:50 +00:00
|
|
|
CaloriesCollectionName string
|
2023-03-11 10:17:30 +00:00
|
|
|
}
|
|
|
|
|
2023-03-12 19:38:48 +00:00
|
|
|
func NewConfig(mongoURl string, dbName string) *Config {
|
2023-03-11 10:17:30 +00:00
|
|
|
return &Config{
|
2023-03-12 19:38:48 +00:00
|
|
|
MongoURL: mongoURl,
|
|
|
|
DBName: dbName,
|
2023-03-11 12:38:01 +00:00
|
|
|
ChatsCollectionName: "chats",
|
2023-03-11 11:30:12 +00:00
|
|
|
WorkoutsCollectionName: "workouts",
|
2023-03-12 06:53:50 +00:00
|
|
|
CaloriesCollectionName: "calories",
|
2023-03-11 10:17:30 +00:00
|
|
|
}
|
|
|
|
}
|