database

package
v0.0.0-...-9c4fc95 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MongoBaseRepository

type MongoBaseRepository struct {
	MongoInstance
	Models interface{}
}

func NewMongoBaseRepository

func NewMongoBaseRepository(collectionName string) *MongoBaseRepository

func (*MongoBaseRepository) CreateOne

func (mbr *MongoBaseRepository) CreateOne(m interface{}) (*string, error)

func (*MongoBaseRepository) Find

func (mbr *MongoBaseRepository) Find(f interface{}) (interface{}, error)

type MongoInstance

type MongoInstance struct {
	Client     *mongo.Client
	Database   *mongo.Database
	Collection *mongo.Collection
}

Jump to

Keyboard shortcuts

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