cosmosdb

package
v0.0.0-...-86c76a3 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateDatabaseAccount

func CreateDatabaseAccount(ctx context.Context, accountName string) (dba documentdb.DatabaseAccount, err error)

CreateDatabaseAccount creates or updates an Azure Cosmos DB database account.

func DeleteDocument

func DeleteDocument(session *mgo.Session, database, collectionName string, id bson.ObjectId) error

DeleteDocument deletes the mongoDB document with the specified ID

func GetCollection

func GetCollection(session *mgo.Session, database, collectionName string) *mgo.Collection

GetCollection gets a mongoDB collection

func GetDocument

func GetDocument(session *mgo.Session, database, collectionName string, query bson.M) (result map[string]interface{}, err error)

GetDocument gets a mongoDB document in the specified collection

func InsertDocument

func InsertDocument(session *mgo.Session, database, collectionName string, document map[string]interface{}) error

InsertDocument inserts a mongoDB document in the specified collection

func ListKeys

ListKeys gets the keys for a Azure Cosmos DB database account.

func UpdateDocument

func UpdateDocument(session *mgo.Session, database, collectionName string, id bson.ObjectId, change bson.M) error

UpdateDocument updates the mongoDB document with the specified ID

Types

This section is empty.

Jump to

Keyboard shortcuts

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