Documentation
¶
Overview ¶
Package common ...
Index ¶
- Constants
- func GetAnnotationValue(annotations map[string]string, annotationKey, labelKey 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 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 BaseOciLayoutUtils
- func (olu BaseOciLayoutUtils) CheckManifestSignature(name string, digest godigest.Digest) bool
- func (olu BaseOciLayoutUtils) GetExpandedRepoInfo(name string) (RepoInfo, error)
- func (olu BaseOciLayoutUtils) GetImageBlobManifest(imageDir string, digest godigest.Digest) (v1.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(imageDir string, hash v1.Hash) (ispec.Image, error)
- func (olu BaseOciLayoutUtils) GetImageLastUpdated(imageInfo ispec.Image) time.Time
- func (olu BaseOciLayoutUtils) GetImageManifest(repo string, reference string) (ispec.Manifest, error)
- func (olu BaseOciLayoutUtils) GetImageManifestSize(repo string, manifestDigest godigest.Digest) int64
- func (olu BaseOciLayoutUtils) GetImageManifests(image 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)
- func (olu BaseOciLayoutUtils) IsValidImageFormat(image string) (bool, error)
- type ImageAnnotations
- type ImageSummary
- type Layer
- type OciLayoutUtils
- type OsArch
- type RepoInfo
- type RepoSummary
- type TagInfo
Constants ¶
View Source
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 GetCategories ¶
func GetDescription ¶
func GetDocumentation ¶ added in v1.4.3
func GetImageDirAndTag ¶
func GetLicenses ¶ added in v1.4.3
func GetRootDir ¶
func GetRootDir(image string, storeController storage.StoreController) string
func GetRoutePrefix ¶
Types ¶
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 (olu BaseOciLayoutUtils) GetImageBlobManifest(imageDir string, digest godigest.Digest) (v1.Manifest, error)
nolint: interfacer
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
nolint: interfacer
func (BaseOciLayoutUtils) GetImageLastUpdated ¶ added in v1.4.2
func (olu BaseOciLayoutUtils) GetImageLastUpdated(imageInfo ispec.Image) time.Time
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(image 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)
func (BaseOciLayoutUtils) IsValidImageFormat ¶ added in v1.4.2
func (olu BaseOciLayoutUtils) IsValidImageFormat(image string) (bool, error)
type ImageAnnotations ¶ added in v1.4.3
type ImageAnnotations struct { Description string Licenses string Title string Documentation string Source string Labels string Vendor 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"` Layers []Layer `json:"layers"` }
type OciLayoutUtils ¶
type OciLayoutUtils interface { GetImageManifests(image string) ([]ispec.Descriptor, error) GetImageBlobManifest(imageDir string, digest godigest.Digest) (v1.Manifest, error) GetImageInfo(imageDir string, hash v1.Hash) (ispec.Image, error) IsValidImageFormat(image string) (bool, error) GetImageTagsWithTimestamp(repo string) ([]TagInfo, error) GetImageLastUpdated(imageInfo ispec.Image) time.Time 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 RepoInfo ¶ added in v1.3.8
type RepoInfo struct { Summary RepoSummary ImageSummaries []ImageSummary `json:"images"` }
type RepoSummary ¶ added in v1.4.2
Click to show internal directories.
Click to hide internal directories.