Documentation ¶
Index ¶
Constants ¶
View Source
const ConnectionURL = "mongodb+srv://userone:L2ORM855sl5XzunU@cluster0.9eqsnyg.mongodb.net"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type IRepository ¶
type IRepository interface {
GetCollection() *mongo.Collection
}
type ProductRepository ¶
type ProductRepository struct {
// contains filtered or unexported fields
}
func (ProductRepository) GetCollection ¶
func (r ProductRepository) GetCollection() *mongo.Collection
GetCollection Call this everytime we want to interact with the mongo collection, like insert, read etc.
type Repositories ¶
type Repositories map[string]IRepository
Repositories singleton map
func Get ¶
func Get() Repositories
Click to show internal directories.
Click to hide internal directories.