usermngmt/db.go

18 lines
391 B
Go
Raw Normal View History

2021-11-08 08:34:20 +00:00
package usermngmt
import (
"fmt"
"go.mongodb.org/mongo-driver/mongo"
)
// getUserCollection ...
func (s Service) getUserCollection() *mongo.Collection {
2021-11-08 11:21:52 +00:00
return s.DB.Collection(fmt.Sprintf("%s-%s", s.TablePrefix, tableUser))
2021-11-08 08:34:20 +00:00
}
// getRoleCollection ...
func (s Service) getRoleCollection() *mongo.Collection {
2021-11-08 11:21:52 +00:00
return s.DB.Collection(fmt.Sprintf("%s-%s", s.TablePrefix, tableRole))
2021-11-08 08:34:20 +00:00
}