database

package
v0.0.0-...-5861326 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Database

type Database struct {
	DB *sql.DB
}

func (Database) Exec

func (d Database) Exec(stmt string, args ...any) (sql.Result, error)

func (Database) GetRemoteImageFromId

func (d Database) GetRemoteImageFromId(imageId int64) (*RemoteImageRow, error)

func (Database) GetRemoteImageFromName

func (d Database) GetRemoteImageFromName(imageName string) (*RemoteImageRow, error)

func (Database) QueryRow

func (d Database) QueryRow(stmt string, args ...any) (*sql.Row, error)

func (Database) SaveRemoteImage

func (d Database) SaveRemoteImage(name string, domain string, created time.Time, digest digest.Digest) (*int64, error)

func (Database) UpdateRemoteImage

func (d Database) UpdateRemoteImage(rowid int64, created *time.Time, digest *digest.Digest) error

func (Database) UpdateRemoteImageCheck

func (d Database) UpdateRemoteImageCheck(rowid int64) error

type RemoteImageRow

type RemoteImageRow struct {
	RowId     int64         // rowid
	Name      string        // name including tag, used for unique row
	Domain    string        // registry domain
	Created   time.Time     // created time
	Digest    digest.Digest // remote digest
	LastCheck time.Time     // last update check time
}

Jump to

Keyboard shortcuts

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