Documentation ¶
Index ¶
- Constants
- func Close(client *mongo.Client, ctx context.Context, cancel context.CancelFunc)
- func Connect(uri string) (*mongo.Client, context.Context, context.CancelFunc, error)
- func HealthCheck(client *mongo.Client, ctx context.Context)
- func Ping(client *mongo.Client, ctx context.Context) bool
- func Query(client *mongo.Client, ctx context.Context, dataBase, col string, ...) (result *mongo.Cursor, err error)
- type ShopRepository
Constants ¶
View Source
const ( DATABASE = "db" COLLECTION = "shop" )
Variables ¶
This section is empty.
Functions ¶
func Close ¶
This is a user defined method to close resources. This method closes mongoDB connection and cancel context.
Types ¶
type ShopRepository ¶
func NewShopRepository ¶
func NewShopRepository() ShopRepository
Click to show internal directories.
Click to hide internal directories.