mongo

package
v0.0.0-...-6f48dd4 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2023 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Database

func Database(in *do.Injector) (*mongo.Database, error)

Types

type Client

type Client struct {
	*mongo.Client
}

func ConnectClient

func ConnectClient(in *do.Injector) (*Client, error)

func (*Client) Shutdown

func (c *Client) Shutdown() error

type Migration

type Migration struct {
	Name       string                                              `bson:"_id"`
	Run        func(ctx context.Context, db *mongo.Database) error `bson:"-"`
	ExecutedAt time.Time                                           `bson:"executed_at"`
}

type Migrator

type Migrator struct {
	// contains filtered or unexported fields
}

func NewMigrator

func NewMigrator(in *do.Injector) (*Migrator, error)

func (*Migrator) Run

func (m *Migrator) Run() error

func (*Migrator) Shutdown

func (m *Migrator) Shutdown() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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