postgres

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: 11 Imported by: 0

Documentation

Index

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

Jump to

Keyboard shortcuts

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