repositories

package
v0.0.0-...-2d31ac5 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const ConnectionURL = "mongodb+srv://userone:L2ORM855sl5XzunU@cluster0.9eqsnyg.mongodb.net"

Variables

This section is empty.

Functions

func Init

func Init()

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

Jump to

Keyboard shortcuts

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