Documentation
¶
Overview ¶
Package cosmos implements the Azure Cosmos DB SQL data-plane REST API against a CloudEmu database driver. Real azure-sdk-for-go/sdk/data/azcosmos clients configured with a custom endpoint hit this handler the same way they hit {account}.documents.azure.com.
Supported operations (parity with AWS DynamoDB):
Databases: POST /dbs, GET /dbs, GET /dbs/{db}, DELETE /dbs/{db}
Containers: POST /dbs/{db}/colls, GET /dbs/{db}/colls, GET .../{c}, DELETE .../{c}
Items: POST /dbs/{db}/colls/{c}/docs (also Query with x-ms-documentdb-isquery)
GET .../docs, GET .../docs/{id}
PUT .../docs/{id}, DELETE .../docs/{id}
The driver doesn't model Cosmos's database-level grouping, so we expose a single virtual database "cloudemu" that always exists and contains every driver table as a container.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler serves Cosmos DB SQL API requests against a database driver.
Click to show internal directories.
Click to hide internal directories.