Documentation ¶
Index ¶
- type PostgresDriver
- func (driver *PostgresDriver) Cleanup() (int, error)
- func (driver *PostgresDriver) Delete(id string) error
- func (driver *PostgresDriver) Get(id string) (*shared.Paste, error)
- func (driver *PostgresDriver) Initialize() error
- func (driver *PostgresDriver) ListIDs() ([]string, error)
- func (driver *PostgresDriver) Save(paste *shared.Paste) error
- func (driver *PostgresDriver) Terminate() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PostgresDriver ¶
type PostgresDriver struct {
// contains filtered or unexported fields
}
PostgresDriver represents the Postgres storage driver
func (*PostgresDriver) Cleanup ¶
func (driver *PostgresDriver) Cleanup() (int, error)
Cleanup cleans up the expired pastes
func (*PostgresDriver) Delete ¶
func (driver *PostgresDriver) Delete(id string) error
Delete deletes a paste
func (*PostgresDriver) Get ¶
func (driver *PostgresDriver) Get(id string) (*shared.Paste, error)
Get loads a paste
func (*PostgresDriver) Initialize ¶
func (driver *PostgresDriver) Initialize() error
Initialize initializes the Postgres storage driver
func (*PostgresDriver) ListIDs ¶
func (driver *PostgresDriver) ListIDs() ([]string, error)
ListIDs returns a list of all existing paste IDs
func (*PostgresDriver) Save ¶
func (driver *PostgresDriver) Save(paste *shared.Paste) error
Save saves a paste
func (*PostgresDriver) Terminate ¶
func (driver *PostgresDriver) Terminate() error
Terminate terminates the Postgres storage driver
Click to show internal directories.
Click to hide internal directories.