repositories

package
v0.0.0-...-4877560 Latest Latest
Warning

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

Go to latest
Published: May 12, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UsersCollectionName         = "users"
	TokensCollectionName        = "tokens"
	RefreshTokensCollectionName = "refreshTokens"
	ResPwdReqCollectionName     = "resetPasswordRequest"
	TrainingsCollectionName     = "trainings"
	ExercisesCollectionName     = "exercises"
)

Variables

This section is empty.

Functions

func CreateCollections

func CreateCollections(l *zerolog.Logger, db *mongo.Database) error

CreateCollections creates mongodb collections

func GetCollection

func GetCollection(l *zerolog.Logger, db *mongo.Database, collName string) *mongo.Collection

func GetDatabase

func GetDatabase(l *zerolog.Logger, uri, dbName string) (*mongo.Database, error)

GetDatabase connects to mongodb and returns database

Types

type Index

type Index struct {
	Name string `bson:"name"`
}

Index represent index on the mongo collection

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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