mongo

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2024 License: CC0-1.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MongoStoreFactory

func MongoStoreFactory(config *docstore.Config) (docstore.Driver, error)

Types

type MongoStore

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

func NewMongoStore

func NewMongoStore(config *docstore.Config) (*MongoStore, error)

func NewMongostore

func NewMongostore(db *database.Database, collection, idField string) (*MongoStore, error)

func (*MongoStore) BulkCreate

func (m *MongoStore) BulkCreate(ctx context.Context, docs []interface{}) error

func (*MongoStore) BulkGet

func (m *MongoStore) BulkGet(ctx context.Context, ids []interface{}, docs interface{}) error

func (*MongoStore) Create

func (m *MongoStore) Create(ctx context.Context, doc interface{}) error

func (*MongoStore) Delete

func (m *MongoStore) Delete(ctx context.Context, id interface{}) error

func (*MongoStore) Find

func (m *MongoStore) Find(ctx context.Context, query *docstore.QueryOpt, docs interface{}) error

func (*MongoStore) Get

func (m *MongoStore) Get(ctx context.Context, id interface{}, doc interface{}) error

func (*MongoStore) GetIncrement

func (m *MongoStore) GetIncrement(ctx context.Context, id interface{}, key string, value int, doc interface{}) error

func (*MongoStore) Increment

func (m *MongoStore) Increment(ctx context.Context, id interface{}, key string, value int) error

func (*MongoStore) Migrate

func (m *MongoStore) Migrate(ctx context.Context, config interface{}) error

func (*MongoStore) Update

func (m *MongoStore) Update(ctx context.Context, id, doc interface{}, replace bool) error

func (*MongoStore) UpdateField

func (m *MongoStore) UpdateField(ctx context.Context, id interface{}, fields []docstore.Field) error

Jump to

Keyboard shortcuts

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