Skip to content

dmyyy/azcosmos-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

azcosmos-example

Setup

Setup environment variables

export DOCUMENT_DB_URI="https://<DB NAME>.documents.azure.com:443/"
export DOCUMENT_DB_PRIMARY_KEY="<PRIMARY KEY>"

Modify dbName/containerName to match database/container names.

go build main.go

Usage

Create item

./main -id 1 -create "test val"

Read item

./main -id 1 -read

Replace item

./main -id 1 -replace "replaced test val"

Delete item

./main -id 1 -delete

About

Simple example program using CRUD operations to interface with azcosmos based on https://github.com/Azure/azure-sdk-for-go/tree/main/sdk/data/azcosmos

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages