store

package
v0.0.0-...-486f8e0 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MongoDBStorage

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

func (*MongoDBStorage) Add

func (m *MongoDBStorage) Add(ctx context.Context, collection string, data any) error

func (*MongoDBStorage) Delete

func (m *MongoDBStorage) Delete(ctx context.Context, collection string, filter any) error

func (*MongoDBStorage) Exists

func (m *MongoDBStorage) Exists(ctx context.Context, collection string, filter any) (bool, error)

func (*MongoDBStorage) Get

func (m *MongoDBStorage) Get(ctx context.Context, collection string, data, filter any) error

func (*MongoDBStorage) GetAll

func (m *MongoDBStorage) GetAll(ctx context.Context, collection string, data, filter any) error

func (*MongoDBStorage) GetAndDelete

func (m *MongoDBStorage) GetAndDelete(ctx context.Context, collection string, data, filter any) error

func (*MongoDBStorage) GetAndUpdate

func (m *MongoDBStorage) GetAndUpdate(ctx context.Context, collection string, data, filter, update any) error

func (*MongoDBStorage) Init

func (m *MongoDBStorage) Init(dbName string) error

func (*MongoDBStorage) Update

func (m *MongoDBStorage) Update(ctx context.Context, collection string, filter, update any) error

type Storage

type Storage interface {
	Init(string) error

	Get(context.Context, string, any, any) error
	Add(context.Context, string, any) error

	GetAndDelete(context.Context, string, any, any) error
	GetAndUpdate(context.Context, string, any, any, any) error

	Delete(context.Context, string, any) error
	Update(context.Context, string, any, any) error

	GetAll(context.Context, string, any, any) error
	Exists(context.Context, string, any) (bool, error)
}

Jump to

Keyboard shortcuts

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