db

package
v0.0.0-...-e831e68 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Connect

func Connect() *mongo.Client

func CreateCounter

func CreateCounter(client *mongo.Client, name string)

func Disconnect

func Disconnect(client *mongo.Client)

Types

type Counter

type Counter struct {
	Name string `bson:"name"`
	Seq  int64  `bson:"seq"`
}

func FindAndUpdateCounter

func FindAndUpdateCounter(client *mongo.Client, name string, increment int) (Counter, error)

Jump to

Keyboard shortcuts

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