Documentation ¶
Index ¶
- func CreateDatabase(pgConnStr string) database.Database
- type Database
- func (db Database) CreateSchemaIfNecessary()
- func (db Database) DeleteBlob(digest string)
- func (db Database) DeleteManifest(digest string)
- func (db Database) GetConnection() *sqlx.DB
- func (db Database) IsBlob(digest string) bool
- func (db Database) IsManifest(digest string) bool
- func (db Database) PullBlob(blob *database.Blob)
- func (db Database) PullManifest(manifest *database.Manifest)
- func (db Database) PullTag(tag *database.Tag)
- func (db Database) PushBlob(blob *database.Blob)
- func (db Database) PushManifest(manifest *database.Manifest)
- func (db Database) PushTag(tag *database.Tag)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateDatabase ¶
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 ¶
DeleteBlob deletes a blob from the database, moving the existing entry to the deleted_blobs table.
func (Database) DeleteManifest ¶
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 ¶
GetConnection returns the database connection.
func (Database) IsManifest ¶
IsManifest determines whether the given digest belongs to a persisted manifest.
func (Database) PullBlob ¶
PullBlob writes a blob to the database, or updates the pulled time of an existing one.
func (Database) PullManifest ¶
PullManifest writes a manifest to the database, or updates the pulled time of an existing one.
func (Database) PullTag ¶
PullTag writes a tag to the database, or updates the pulled time of an existing one.
func (Database) PushBlob ¶
PushBlob writes a blob to the database, or updates the pushed time of an existing one.
func (Database) PushManifest ¶
PushManifest writes a manifest to the database, or updates the pushed time of an existing one.