Documentation ¶
Overview ¶
Package mongodb is an implementation of StateStore interface to perform operations on store
Index ¶
- func NewMongoDB(logger logger.Logger) state.Store
- type Item
- type MongoDB
- func (m *MongoDB) BulkGet(ctx context.Context, req []state.GetRequest, _ state.BulkGetOpts) ([]state.BulkGetResponse, error)
- func (m *MongoDB) Close() error
- func (m *MongoDB) Delete(ctx context.Context, req *state.DeleteRequest) error
- func (m *MongoDB) Features() []state.Feature
- func (m *MongoDB) Get(ctx context.Context, req *state.GetRequest) (*state.GetResponse, error)
- func (m *MongoDB) GetComponentMetadata() (metadataInfo metadata.MetadataMap)
- func (m *MongoDB) Init(ctx context.Context, metadata state.Metadata) (err error)
- func (m *MongoDB) Multi(ctx context.Context, request *state.TransactionalStateRequest) error
- func (m *MongoDB) Ping(ctx context.Context) error
- func (m *MongoDB) Query(ctx context.Context, req *state.QueryRequest) (*state.QueryResponse, error)
- func (m *MongoDB) Set(ctx context.Context, req *state.SetRequest) error
- type Query
- func (q *Query) Finalize(filters string, qq *query.Query) error
- func (q *Query) VisitAND(f *query.AND) (string, error)
- func (q *Query) VisitEQ(f *query.EQ) (string, error)
- func (q *Query) VisitGT(f *query.GT) (string, error)
- func (q *Query) VisitGTE(f *query.GTE) (string, error)
- func (q *Query) VisitIN(f *query.IN) (string, error)
- func (q *Query) VisitLT(f *query.LT) (string, error)
- func (q *Query) VisitLTE(f *query.LTE) (string, error)
- func (q *Query) VisitNEQ(f *query.NEQ) (string, error)
- func (q *Query) VisitOR(f *query.OR) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Item ¶
type Item struct { Key string `bson:"_id"` Value interface{} `bson:"value"` Etag string `bson:"_etag"` TTL *time.Time `bson:"_ttl,omitempty"` }
Item is Mongodb document wrapper.
type MongoDB ¶
MongoDB is a state store implementation for MongoDB.
func (*MongoDB) BulkGet ¶ added in v1.11.0
func (m *MongoDB) BulkGet(ctx context.Context, req []state.GetRequest, _ state.BulkGetOpts) ([]state.BulkGetResponse, error)
func (*MongoDB) Features ¶ added in v1.1.1
Features returns the features available in this state store.
func (*MongoDB) Get ¶
func (m *MongoDB) Get(ctx context.Context, req *state.GetRequest) (*state.GetResponse, error)
Get retrieves state from MongoDB with a key.
func (*MongoDB) GetComponentMetadata ¶ added in v1.10.1
func (m *MongoDB) GetComponentMetadata() (metadataInfo metadata.MetadataMap)
func (*MongoDB) Multi ¶
Multi performs a transactional operation. succeeds only if all operations succeed, and fails if one or more operations fail.
func (*MongoDB) Query ¶ added in v1.5.0
func (m *MongoDB) Query(ctx context.Context, req *state.QueryRequest) (*state.QueryResponse, error)
Query executes a query against store.
Click to show internal directories.
Click to hide internal directories.