mongodb

package
v0.0.0-...-317d7e6 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MongoDBDriver

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

MongoDBDriver represents the MongoDB storage driver

func (*MongoDBDriver) Cleanup

func (driver *MongoDBDriver) Cleanup() (int, error)

Cleanup cleans up the expired pastes

func (*MongoDBDriver) Delete

func (driver *MongoDBDriver) Delete(id string) error

Delete deletes a paste

func (*MongoDBDriver) Get

func (driver *MongoDBDriver) Get(id string) (*shared.Paste, error)

Get loads a paste

func (*MongoDBDriver) Initialize

func (driver *MongoDBDriver) Initialize() error

Initialize initializes the MongoDB storage driver

func (*MongoDBDriver) ListIDs

func (driver *MongoDBDriver) ListIDs() ([]string, error)

ListIDs returns a list of all existing paste IDs

func (*MongoDBDriver) Save

func (driver *MongoDBDriver) Save(paste *shared.Paste) error

Save saves a paste

func (*MongoDBDriver) Terminate

func (driver *MongoDBDriver) Terminate() error

Terminate terminates the MongoDB storage driver

Jump to

Keyboard shortcuts

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