mongodb

package
v0.0.0-...-1a5deed Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// SortOrderDescending MongoDB's sort descending flag
	SortOrderDescending = -1

	// SortOrderAscending MongoDB sort ascending flag
	SortOrderAscending = 1
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Repository

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

func NewRepository

func NewRepository(db *mongo.Database, collection string) Repository

func (Repository) Collection

func (repository Repository) Collection() *mongo.Collection

func (Repository) DB

func (repository Repository) DB() *mongo.Database

func (Repository) DefaultTimeoutContext

func (repository Repository) DefaultTimeoutContext() context.Context

func (Repository) GetFindOptions

func (repository Repository) GetFindOptions(skip *int, take *int, sortBy *string, sortDirection *string) *options.FindOptions

Jump to

Keyboard shortcuts

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