postgres

package
v0.0.0-...-910df6c Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2018 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateDatabase

func CreateDatabase(pgConnStr string) database.Database

CreateDatabase creates a PostgresDatabase which contains a connection to a Postgres database.

Types

type Database

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

Database is an implementation of database.Database for Postgres.

func (Database) CreateSchemaIfNecessary

func (db Database) CreateSchemaIfNecessary()

CreateSchemaIfNecessary does what it says on the tin.

func (Database) DeleteBlob

func (db Database) DeleteBlob(digest string)

DeleteBlob deletes a blob from the database, moving the existing entry to the deleted_blobs table.

func (Database) DeleteManifest

func (db Database) DeleteManifest(digest string)

DeleteManifest deletes a manifest and associated tag from the database, moving the existing entries to the deleted_manifests and deleted_tags tables.

func (Database) GetConnection

func (db Database) GetConnection() *sqlx.DB

GetConnection returns the database connection.

func (Database) IsBlob

func (db Database) IsBlob(digest string) bool

IsBlob determines whether the given digest belongs to a persisted blob.

func (Database) IsManifest

func (db Database) IsManifest(digest string) bool

IsManifest determines whether the given digest belongs to a persisted manifest.

func (Database) PullBlob

func (db Database) PullBlob(blob *database.Blob)

PullBlob writes a blob to the database, or updates the pulled time of an existing one.

func (Database) PullManifest

func (db Database) PullManifest(manifest *database.Manifest)

PullManifest writes a manifest to the database, or updates the pulled time of an existing one.

func (Database) PullTag

func (db Database) PullTag(tag *database.Tag)

PullTag writes a tag to the database, or updates the pulled time of an existing one.

func (Database) PushBlob

func (db Database) PushBlob(blob *database.Blob)

PushBlob writes a blob to the database, or updates the pushed time of an existing one.

func (Database) PushManifest

func (db Database) PushManifest(manifest *database.Manifest)

PushManifest writes a manifest to the database, or updates the pushed time of an existing one.

func (Database) PushTag

func (db Database) PushTag(tag *database.Tag)

PushTag writes a tag to the database, or updates the pushed time of an existing one.

Jump to

Keyboard shortcuts

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