persistence

package
v0.0.7-versioncheck.96 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2024 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConnectToDatabase

func ConnectToDatabase(ctx context.Context, databaseConnected chan struct{}, databaseStopped chan struct{}, config MongoDBConfig) error

func CreateMongoDBClient

func CreateMongoDBClient(ctx context.Context, uri string) (*mongo.Client, error)

Types

type MongoDBConfig

type MongoDBConfig struct {
	HostUri                string
	DatabaseName           string
	FileMetadataCollection string
}

type MongoDBRepository

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

func NewMongoDBRepository

func NewMongoDBRepository(ctx context.Context, client *mongo.Client, databaseName string, collectionName string) (*MongoDBRepository, error)

Jump to

Keyboard shortcuts

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