cosmosdb

package
v1.0.0-rc3 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2021 License: MIT Imports: 8 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CosmosItem

type CosmosItem struct {
	documentdb.Document
	ID           string      `json:"id"`
	Value        interface{} `json:"value"`
	PartitionKey string      `json:"partitionKey"`
}

CosmosItem is a wrapper around a CosmosDB document

type CosmosItemWithRawMessage added in v0.2.1

type CosmosItemWithRawMessage struct {
	documentdb.Document
	ID           string              `json:"id"`
	Value        jsoniter.RawMessage `json:"value"`
	PartitionKey string              `json:"partitionKey"`
}

CosmosItemWithRawMessage is a version of CosmosItem with a Value of RawMessage so this field is not marshalled. If it is marshalled it will end up in a form that cannot be unmarshalled. This type is used when SetRequest.Value arrives as bytes.

type StateStore

type StateStore struct {
	state.DefaultBulkStore
	// contains filtered or unexported fields
}

StateStore is a CosmosDB state store

func NewCosmosDBStateStore

func NewCosmosDBStateStore(logger logger.Logger) *StateStore

NewCosmosDBStateStore returns a new CosmosDB state store

func (*StateStore) Delete

func (c *StateStore) Delete(req *state.DeleteRequest) error

Delete performs a delete operation

func (*StateStore) Get

func (c *StateStore) Get(req *state.GetRequest) (*state.GetResponse, error)

Get retrieves a CosmosDB item

func (*StateStore) Init

func (c *StateStore) Init(metadata state.Metadata) error

Init does metadata and connection parsing

func (*StateStore) Multi added in v0.2.0

func (c *StateStore) Multi(request *state.TransactionalStateRequest) error

Multi performs a transactional operation. succeeds only if all operations succeed, and fails if one or more operations fail

func (*StateStore) Set

func (c *StateStore) Set(req *state.SetRequest) error

Set saves a CosmosDB item

Jump to

Keyboard shortcuts

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