storage

package
v0.0.0-...-0642f7a Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(storageConfig config.Storage) error

New creates storage handler from config.Storage and prepare it for use returns error if something went wrong during the preparations

Types

type Interface

type Interface interface {
	Prepare() error
	Close() error
	DropCollection(db string, doc object.Interface) error
	DropDatabase(db string) error
	One(doc object.Interface) error
	List(docs object.Interfaces, opt object.ListOpt) (int, error)
	ListParent(parent string, docs object.Interfaces) error
	Insert(doc object.Interface) error
	Update(doc object.Interface) error
	Remove(doc object.Interface) error
}

Interface defines the base functionality which any storage handler should implement to become valid storage handler

func Handler

func Handler() Interface

Handler returns the registered storage handler

Directories

Path Synopsis
handlers

Jump to

Keyboard shortcuts

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