repository

package
v0.0.0-...-e06870b Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2021 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Connection

type Connection struct {
	Ctx    context.Context
	Client *mongo.Client
	DB     *mongo.Database
}

func NewConnection

func NewConnection(ctx context.Context, dbName string) (*Connection, error)

func (*Connection) CheckIfCollectionExists

func (c *Connection) CheckIfCollectionExists(collName string) (bool, error)

func (*Connection) GetCollection

func (c *Connection) GetCollection(collName string) *mongo.Collection

func (*Connection) NewCollection

func (c *Connection) NewCollection(collName string) (*mongo.Collection, error)

Jump to

Keyboard shortcuts

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