mongo

package
v0.0.0-...-5f12549 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2024 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MongoOpts = options.Replace().SetUpsert(true)

Functions

func GetTokenColl

func GetTokenColl(ctx context.Context, client *mongo.Client) (coll *mongo.Collection, err error)

GetTokenColl returns the resumption tokens collection. It also creates (idempotently) the index on the “tokens” field in that collection.

func InitializeMongo

func InitializeMongo(ctx context.Context) (*mongo.Client, *mongo.Collection, error)

InitializeMongo makes the connection to the MongoDB, creates the database “gepris” with the collection “projects” and the index for the “number” field. Everything of this that already exists is left as is.

Types

This section is empty.

Jump to

Keyboard shortcuts

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