mongo

package
v0.0.0-...-b1be0e3 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	USER_COLLECTION = "user"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Repository

type Repository interface {
	UserCreate(ctx context.Context, data *model.UserModel) error
	UserFind(ctx context.Context, filters bson.M, orderBy string, pagination bool, page, perPage int) ([]*model.UserModel, error)
	UserFindByID(ctx context.Context, filters bson.M, sort string) (*model.UserModel, error)
	UserUpdate(ctx context.Context, filters bson.M, data *model.UserModel, id string) error
	UserDelete(ctx context.Context, filters bson.M) error
}

Repository represent the repositories

func NewMongoRepository

func NewMongoRepository(client *mongo.Client, dbName string) Repository

NewMongoRepository will create an object that represent the Repository interface

Jump to

Keyboard shortcuts

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