Documentation ¶
Overview ¶
Package common ...
Index ¶
- Constants
- func GetAnnotationValue(annotations map[string]string, annotationKey, labelKey string) string
- func GetAuthors(annotations map[string]string) string
- func GetCategories(labels map[string]string) string
- func GetDescription(annotations map[string]string) string
- func GetDocumentation(annotations map[string]string) string
- func GetImageDirAndTag(imageName string) (string, string)
- func GetImageLastUpdated(imageInfo ispec.Image) time.Time
- func GetLicenses(annotations map[string]string) string
- func GetRepo(image string) string
- func GetRootDir(image string, storeController storage.StoreController) string
- func GetRoutePrefix(name string) string
- func GetSource(annotations map[string]string) string
- func GetTitle(annotations map[string]string) string
- func GetVendor(annotations map[string]string) string
- type Annotation
- type BaseOciLayoutUtils
- func (olu BaseOciLayoutUtils) CheckManifestSignature(name string, digest godigest.Digest) bool
- func (olu BaseOciLayoutUtils) GetExpandedRepoInfo(name string) (RepoInfo, error)
- func (olu BaseOciLayoutUtils) GetImageBlobManifest(repo string, digest godigest.Digest) (ispec.Manifest, error)
- func (olu BaseOciLayoutUtils) GetImageConfigInfo(repo string, manifestDigest godigest.Digest) (ispec.Image, error)
- func (olu BaseOciLayoutUtils) GetImageConfigSize(repo string, manifestDigest godigest.Digest) int64
- func (olu BaseOciLayoutUtils) GetImageInfo(repo string, digest godigest.Digest) (ispec.Image, error)
- func (olu BaseOciLayoutUtils) GetImageManifest(repo string, reference string) (ispec.Manifest, godigest.Digest, error)
- func (olu BaseOciLayoutUtils) GetImageManifestSize(repo string, manifestDigest godigest.Digest) int64
- func (olu BaseOciLayoutUtils) GetImageManifests(repo string) ([]ispec.Descriptor, error)
- func (olu BaseOciLayoutUtils) GetImagePlatform(imageConfig ispec.Image) (string, string)
- func (olu BaseOciLayoutUtils) GetImageTagsWithTimestamp(repo string) ([]TagInfo, error)
- func (olu BaseOciLayoutUtils) GetRepoLastUpdated(repo string) (TagInfo, error)
- func (olu BaseOciLayoutUtils) GetRepositories() ([]string, error)
- type HistoryDescription
- type ImageAnnotations
- type ImageSummary
- type ImageVulnerabilitySummary
- type LayerHistory
- type LayerSummary
- type OciLayoutUtils
- type OsArch
- type Referrer
- type RepoInfo
- type RepoSummary
- type TagInfo
Constants ¶
const ( // See https://github.com/opencontainers/image-spec/blob/main/annotations.md#back-compatibility-with-label-schema AnnotationLabels = "org.label-schema.labels" LabelAnnotationCreated = "org.label-schema.build-date" LabelAnnotationVendor = "org.label-schema.vendor" LabelAnnotationDescription = "org.label-schema.description" LabelAnnotationTitle = "org.label-schema.name" LabelAnnotationDocumentation = "org.label-schema.usage" LabelAnnotationSource = "org.label-schema.vcs-url" )
Variables ¶
This section is empty.
Functions ¶
func GetAnnotationValue ¶ added in v1.4.3
OCI annotation/label with backwards compatibility
arg can be either lables or annotations https://github.com/opencontainers/image-spec/blob/main/annotations.md.
func GetAuthors ¶ added in v1.4.3
func GetCategories ¶
func GetDescription ¶
func GetDocumentation ¶ added in v1.4.3
func GetImageDirAndTag ¶
func GetImageLastUpdated ¶ added in v1.4.3
GetImageLastUpdated This method will return last updated timestamp. The Created timestamp is used, but if it is missing, look at the history field and, if provided, return the timestamp of last entry in history.
func GetLicenses ¶ added in v1.4.3
func GetRootDir ¶
func GetRootDir(image string, storeController storage.StoreController) string
func GetRoutePrefix ¶
Types ¶
type Annotation ¶ added in v1.4.3
type BaseOciLayoutUtils ¶ added in v1.4.2
type BaseOciLayoutUtils struct { Log log.Logger StoreController storage.StoreController }
OciLayoutInfo ...
func NewBaseOciLayoutUtils ¶ added in v1.4.2
func NewBaseOciLayoutUtils(storeController storage.StoreController, log log.Logger) *BaseOciLayoutUtils
NewBaseOciLayoutUtils initializes a new OciLayoutUtils object.
func (BaseOciLayoutUtils) CheckManifestSignature ¶ added in v1.4.2
func (olu BaseOciLayoutUtils) CheckManifestSignature(name string, digest godigest.Digest) bool
checks if manifest is signed or not checks for notary or cosign signature if cosign signature found it does not looks for notary signature.
func (BaseOciLayoutUtils) GetExpandedRepoInfo ¶ added in v1.4.2
func (olu BaseOciLayoutUtils) GetExpandedRepoInfo(name string) (RepoInfo, error)
func (BaseOciLayoutUtils) GetImageBlobManifest ¶ added in v1.4.2
func (BaseOciLayoutUtils) GetImageConfigInfo ¶ added in v1.4.2
func (BaseOciLayoutUtils) GetImageConfigSize ¶ added in v1.4.2
func (olu BaseOciLayoutUtils) GetImageConfigSize(repo string, manifestDigest godigest.Digest) int64
func (BaseOciLayoutUtils) GetImageInfo ¶ added in v1.4.2
func (BaseOciLayoutUtils) GetImageManifest ¶ added in v1.4.3
func (BaseOciLayoutUtils) GetImageManifestSize ¶ added in v1.4.2
func (olu BaseOciLayoutUtils) GetImageManifestSize(repo string, manifestDigest godigest.Digest) int64
func (BaseOciLayoutUtils) GetImageManifests ¶ added in v1.4.2
func (olu BaseOciLayoutUtils) GetImageManifests(repo string) ([]ispec.Descriptor, error)
Below method will return image path including root dir, root dir is determined by splitting.
func (BaseOciLayoutUtils) GetImagePlatform ¶ added in v1.4.2
func (olu BaseOciLayoutUtils) GetImagePlatform(imageConfig ispec.Image) ( string, string, )
func (BaseOciLayoutUtils) GetImageTagsWithTimestamp ¶ added in v1.4.2
func (olu BaseOciLayoutUtils) GetImageTagsWithTimestamp(repo string) ([]TagInfo, error)
GetImageTagsWithTimestamp returns a list of image tags with timestamp available in the specified repository.
func (BaseOciLayoutUtils) GetRepoLastUpdated ¶ added in v1.4.2
func (olu BaseOciLayoutUtils) GetRepoLastUpdated(repo string) (TagInfo, error)
func (BaseOciLayoutUtils) GetRepositories ¶ added in v1.4.3
func (olu BaseOciLayoutUtils) GetRepositories() ([]string, error)
Provide a list of repositories from all the available image stores.
type HistoryDescription ¶ added in v1.4.3
type ImageAnnotations ¶ added in v1.4.3
type ImageAnnotations struct { Description string Licenses string Title string Documentation string Source string Labels string Vendor string Authors string }
func GetAnnotations ¶ added in v1.4.3
func GetAnnotations(annotations, labels map[string]string) ImageAnnotations
type ImageSummary ¶ added in v1.4.3
type ImageSummary struct { RepoName string `json:"repoName"` Tag string `json:"tag"` Digest string `json:"digest"` ConfigDigest string `json:"configDigest"` LastUpdated time.Time `json:"lastUpdated"` IsSigned bool `json:"isSigned"` Size string `json:"size"` Platform OsArch `json:"platform"` Vendor string `json:"vendor"` Score int `json:"score"` DownloadCount int `json:"downloadCount"` Description string `json:"description"` Licenses string `json:"licenses"` Labels string `json:"labels"` Title string `json:"title"` Source string `json:"source"` Documentation string `json:"documentation"` History []LayerHistory `json:"history"` Layers []LayerSummary `json:"layers"` Vulnerabilities ImageVulnerabilitySummary `json:"vulnerabilities"` Authors string `json:"authors"` }
type ImageVulnerabilitySummary ¶ added in v1.4.3
type LayerHistory ¶ added in v1.4.3
type LayerHistory struct { Layer LayerSummary `json:"layer"` HistoryDescription HistoryDescription `json:"historyDescription"` }
type LayerSummary ¶ added in v1.4.3
type OciLayoutUtils ¶
type OciLayoutUtils interface { GetImageManifest(repo string, reference string) (ispec.Manifest, godigest.Digest, error) GetImageManifests(repo string) ([]ispec.Descriptor, error) GetImageBlobManifest(repo string, digest godigest.Digest) (ispec.Manifest, error) GetImageInfo(repo string, digest godigest.Digest) (ispec.Image, error) GetImageTagsWithTimestamp(repo string) ([]TagInfo, error) GetImagePlatform(imageInfo ispec.Image) (string, string) GetImageManifestSize(repo string, manifestDigest godigest.Digest) int64 GetRepoLastUpdated(repo string) (TagInfo, error) GetExpandedRepoInfo(name string) (RepoInfo, error) GetImageConfigInfo(repo string, manifestDigest godigest.Digest) (ispec.Image, error) CheckManifestSignature(name string, digest godigest.Digest) bool GetRepositories() ([]string, error) }
type Referrer ¶ added in v1.4.3
type Referrer struct { MediaType string `json:"mediatype"` ArtifactType string `json:"artifacttype"` Size int `json:"size"` Digest string `json:"digest"` Annotations []Annotation `json:"annotations"` }
type RepoInfo ¶ added in v1.3.8
type RepoInfo struct { Summary RepoSummary ImageSummaries []ImageSummary `json:"images"` }