mongodbx

package
v0.0.0-...-fefde71 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 10, 2024 License: GPL-3.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClient

func NewClient(app *configx.Application) (*mongo.Client, error)

NewClient returns a new mongo client.

func NewClientWithClean

func NewClientWithClean(app *configx.Application) (*mongo.Client, func(), error)

NewClientWithClean returns a new mongo client with clean.

func NewClientWithDSN

func NewClientWithDSN(dsn string) (*mongo.Client, error)

NewClientWithDSN returns a new mongo client with dsn.

func NewDeliveryRepo

func NewDeliveryRepo(rw *mongo.Client) repo.IDeliveryRepo

NewDeliveryRepo will create a new delivery repository.

func NewNotificationRepo

func NewNotificationRepo(rw *mongo.Client) repo.INotificationRepo

NewNotificationRepo is to create a new mongodbNotificationRepo.

func NewPaymentRepo

func NewPaymentRepo(rw *mongo.Client) repo.IPaymentRepo

NewPaymentRepo is to create a new mongodbPaymentRepo.

func NewRestaurantRepo

func NewRestaurantRepo(rw *mongo.Client) repo.IRestaurantRepo

NewRestaurantRepo is to create a new mongodbRestaurantRepo.

Types

type Container

type Container struct {
	*mongodb.MongoDBContainer
}

Container is used to represent a mongodb container.

func NewContainer

func NewContainer(ctx contextx.Contextx) (*Container, error)

NewContainer returns a new mongodb container.

func (*Container) RW

func (c *Container) RW(ctx contextx.Contextx) (*mongo.Client, error)

RW returns a read-write client.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL