common

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2022 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package common ...

Index

Constants

View Source
const (
	AnnotationLabels           = "org.label-schema.labels"
	LabelAnnotationCreated     = "org.label-schema.build-date"
	LabelAnnotationVendor      = "org.label-schema.vendor"
	LabelAnnotationDescription = "org.label-schema.description"
	LabelAnnotationLicenses    = "org.label-schema.license"
)

Variables

This section is empty.

Functions

func GetCategories

func GetCategories(labels map[string]string) string

func GetDescription

func GetDescription(labels map[string]string) string

func GetImageDirAndTag

func GetImageDirAndTag(imageName string) (string, string)

func GetImageRepoPath

func GetImageRepoPath(image string, storeController storage.StoreController) string

func GetLicense

func GetLicense(labels map[string]string) string

func GetRepo

func GetRepo(image string) string

func GetRootDir

func GetRootDir(image string, storeController storage.StoreController) string

func GetRoutePrefix

func GetRoutePrefix(name string) string

func GetVendor

func GetVendor(labels map[string]string) string

Types

type Layer added in v1.3.8

type Layer struct {
	Size   string `json:"size"`
	Digest string `json:"digest"`
}

type Manifest added in v1.3.8

type Manifest struct {
	Tag      string  `json:"tag"`
	Digest   string  `json:"digest"`
	IsSigned bool    `json:"isSigned"`
	Layers   []Layer `json:"layers"`
}

type OciLayoutUtils

type OciLayoutUtils struct {
	Log             log.Logger
	StoreController storage.StoreController
}

OciLayoutInfo ...

func NewOciLayoutUtils

func NewOciLayoutUtils(storeController storage.StoreController, log log.Logger) *OciLayoutUtils

NewOciLayoutUtils initializes a new OciLayoutUtils object.

func (OciLayoutUtils) GetExpandedRepoInfo added in v1.3.8

func (olu OciLayoutUtils) GetExpandedRepoInfo(name string) (RepoInfo, error)

func (OciLayoutUtils) GetImageBlobManifest

func (olu OciLayoutUtils) GetImageBlobManifest(imageDir string, digest godigest.Digest) (v1.Manifest, error)

nolint: interfacer

func (OciLayoutUtils) GetImageInfo

func (olu OciLayoutUtils) GetImageInfo(imageDir string, hash v1.Hash) (ispec.Image, error)

nolint: interfacer

func (OciLayoutUtils) GetImageManifests

func (olu OciLayoutUtils) GetImageManifests(image string) ([]ispec.Descriptor, error)

Below method will return image path including root dir, root dir is determined by splitting.

func (OciLayoutUtils) GetImageTagsWithTimestamp

func (olu OciLayoutUtils) GetImageTagsWithTimestamp(repo string) ([]TagInfo, error)

GetImageTagsWithTimestamp returns a list of image tags with timestamp available in the specified repository.

func (OciLayoutUtils) IsValidImageFormat

func (olu OciLayoutUtils) IsValidImageFormat(image string) (bool, error)

type RepoInfo added in v1.3.8

type RepoInfo struct {
	Manifests []Manifest `json:"manifests"`
}

type TagInfo

type TagInfo struct {
	Name      string
	Digest    string
	Timestamp time.Time
}

func GetFixedTags

func GetFixedTags(allTags []TagInfo, infectedTags []TagInfo) []TagInfo

func GetLatestTag

func GetLatestTag(allTags []TagInfo) TagInfo

Jump to

Keyboard shortcuts

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