cosmosdb

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2021 License: MIT Imports: 15 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"`
	IsBinary     bool        `json:"isBinary"`
	PartitionKey string      `json:"partitionKey"`
	TTL          *int        `json:"ttl,omitempty"`
}

CosmosItem is a wrapper around a CosmosDB document.

type Query added in v1.5.0

type Query struct {
	// contains filtered or unexported fields
}

func (*Query) Finalize added in v1.5.0

func (q *Query) Finalize(filters string, qq *query.Query) error

func (*Query) VisitAND added in v1.5.0

func (q *Query) VisitAND(f *query.AND) (string, error)

func (*Query) VisitEQ added in v1.5.0

func (q *Query) VisitEQ(f *query.EQ) (string, error)

func (*Query) VisitIN added in v1.5.0

func (q *Query) VisitIN(f *query.IN) (string, error)

func (*Query) VisitOR added in v1.5.0

func (q *Query) VisitOR(f *query.OR) (string, error)

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) Features added in v1.1.1

func (c *StateStore) Features() []state.Feature

Features returns the features available in this state store.

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(meta 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) Ping added in v1.4.4

func (c *StateStore) Ping() error

func (*StateStore) Query added in v1.5.0

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