Documentation ¶
Index ¶
- type MongoDBDriver
- func (driver *MongoDBDriver) Cleanup() (int, error)
- func (driver *MongoDBDriver) Delete(id string) error
- func (driver *MongoDBDriver) Get(id string) (*shared.Paste, error)
- func (driver *MongoDBDriver) Initialize() error
- func (driver *MongoDBDriver) ListIDs() ([]string, error)
- func (driver *MongoDBDriver) Save(paste *shared.Paste) error
- func (driver *MongoDBDriver) Terminate() error
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
Click to show internal directories.
Click to hide internal directories.