database

package
v0.0.0-...-66c7d48 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Connect

func Connect(dsn string, ctx context.Context) (*mongo.Client, mongo.Session, error)

Types

type Database

type Database interface {
	GetUserCollection() *mongo.Collection
	GetFileCollection() *mongo.Collection
	Close()
	StartTranscation() error
	EndTranscation() error
	CommitTranscation() error
}

func NewDatabase

func NewDatabase(dsn string, ctx context.Context) (Database, error)

Jump to

Keyboard shortcuts

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