mirror of
https://github.com/cadmium-im/zirconium-go.git
synced 2024-11-23 19:02:20 +00:00
22 lines
311 B
Go
22 lines
311 B
Go
package core
|
|
|
|
import "go.mongodb.org/mongo-driver/mongo"
|
|
|
|
const (
|
|
UsersCollectionName = "users"
|
|
)
|
|
|
|
type UserManager struct {
|
|
usersCol *mongo.Collection
|
|
}
|
|
|
|
func NewUserManager(db *mongo.Database) *UserManager {
|
|
col := db.Collection(UsersCollectionName)
|
|
|
|
um := &UserManager{
|
|
usersCol: col,
|
|
}
|
|
|
|
return um
|
|
}
|