database

package
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConversionDatabase

type ConversionDatabase interface {
	// Layer Entries
	CreateLayerEntry(ctx context.Context, host, repository string, convertedDigest digest.Digest, chainID string, size int64) error
	GetLayerEntryForRepo(ctx context.Context, host, repository, chainID string) *LayerEntry
	GetCrossRepoLayerEntries(ctx context.Context, host, chainID string) []*LayerEntry
	DeleteLayerEntry(ctx context.Context, host, repository, chainID string) error

	// Manifest Entries
	CreateManifestEntry(ctx context.Context, host, repository, mediatype string, original, convertedDigest digest.Digest, size int64) error
	GetManifestEntryForRepo(ctx context.Context, host, repository, mediatype string, original digest.Digest) *ManifestEntry
	GetCrossRepoManifestEntries(ctx context.Context, host, mediatype string, original digest.Digest) []*ManifestEntry
	DeleteManifestEntry(ctx context.Context, host, repository, mediatype string, original digest.Digest) error
}

func NewSqlDB

func NewSqlDB(db *sql.DB) ConversionDatabase

type LayerEntry added in v1.0.3

type LayerEntry struct {
	ConvertedDigest digest.Digest
	DataSize        int64
	Repository      string
	ChainID         string
	Host            string
}

type ManifestEntry added in v1.0.3

type ManifestEntry struct {
	ConvertedDigest digest.Digest
	OriginalDigest  digest.Digest
	DataSize        int64
	Repository      string
	Host            string
	MediaType       string
}

Jump to

Keyboard shortcuts

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