db

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddCollectionIndex

func AddCollectionIndex(dbName, collectionName string, indexModel mongo.IndexModel) error

func CloseMongoConn

func CloseMongoConn()

func CollectionExists

func CollectionExists(dbName, collectionName string) (bool, error)

func CreateCappedCollection

func CreateCappedCollection(dbName, collectionName string, maxDocuments, mb int64) error

func GetConfiguredDevice

func GetConfiguredDevice(udid string) (*models.Device, error)

func GetConfiguredDevices

func GetConfiguredDevices(providerName string) ([]*models.Device, error)

func GetProviderFromDB

func GetProviderFromDB(nickname string) (models.ProviderDB, error)

func InitMongoClient

func InitMongoClient(mongoDb string)

func MongoClient

func MongoClient() *mongo.Client

func MongoCtx

func MongoCtx() context.Context

func MongoCtxCancel

func MongoCtxCancel() context.CancelFunc

func UpsertDeviceDB

func UpsertDeviceDB(device models.Device) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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