datastore

package
v0.0.0-...-6919524 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DataStore

type DataStore interface {
	Create(ctx context.Context, collection string, data interface{}) error
	Read(ctx context.Context, collection string, filter interface{}, result interface{}) error
	Delete(ctx context.Context, collection string, filter interface{}) error
}

type MongoDBDataStore

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

func GetMongoDBDataStoreInstance

func GetMongoDBDataStoreInstance(uri, dbName string) (*MongoDBDataStore, error)

func (*MongoDBDataStore) Create

func (m *MongoDBDataStore) Create(ctx context.Context, collection string, data interface{}) error

func (*MongoDBDataStore) Delete

func (m *MongoDBDataStore) Delete(ctx context.Context, collection string, filter interface{}) error

func (*MongoDBDataStore) Read

func (m *MongoDBDataStore) Read(ctx context.Context, collection string, filter interface{}, result interface{}) error

Jump to

Keyboard shortcuts

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