container

package
v0.19.4 Latest Latest
Warning

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

Go to latest
Published: May 24, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ManifestFilename = "manifest.json"
	UploadVersion    = "_upload"
)

Variables

View Source
var ErrContainerBlobNotExist = util.NewNotExistErrorf("container blob does not exist")

Functions

func GetContainerBlob

func GetContainerBlob(ctx context.Context, opts *BlobSearchOptions) (*packages.PackageFileDescriptor, error)

GetContainerBlob gets the container blob matching the blob search options If multiple matching blobs are found (manifests with the same digest) the first (according to the database) is selected.

func GetContainerBlobs

func GetContainerBlobs(ctx context.Context, opts *BlobSearchOptions) ([]*packages.PackageFileDescriptor, error)

GetContainerBlobs gets the container blobs matching the blob search options

func GetImageTags

func GetImageTags(ctx context.Context, ownerID int64, image string, n int, last string) ([]string, error)

GetImageTags gets a sorted list of the tags of an image The result is suitable for the api call.

func GetManifestVersions

func GetManifestVersions(ctx context.Context, opts *BlobSearchOptions) ([]*packages.PackageVersion, error)

GetManifestVersions gets all package versions representing the matching manifest

func GetRepositories

func GetRepositories(ctx context.Context, actor *user_model.User, n int, last string) ([]string, error)

GetRepositories gets a sorted list of all repositories

func SearchExpiredUploadedBlobs

func SearchExpiredUploadedBlobs(ctx context.Context, olderThan time.Duration) ([]*packages.PackageFile, error)

SearchExpiredUploadedBlobs gets all uploaded blobs which are older than specified

func SearchImageTags

func SearchImageTags(ctx context.Context, opts *ImageTagsSearchOptions) ([]*packages.PackageVersion, int64, error)

SearchImageTags gets a sorted list of the tags of an image

Types

type BlobSearchOptions

type BlobSearchOptions struct {
	OwnerID    int64
	Image      string
	Digest     string
	Tag        string
	IsManifest bool
	Repository string
}

type ImageTagsSearchOptions

type ImageTagsSearchOptions struct {
	PackageID int64
	Query     string
	IsTagged  bool
	Sort      packages.VersionSort
	db.Paginator
}

Jump to

Keyboard shortcuts

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