oci

package module
v0.0.0-...-8842bec Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2023 License: GPL-3.0 Imports: 11 Imported by: 0

README

OCI

oci is a library for working with OCI images in VanillaOS.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Digest

func Digest(image string) (string, error)

Digest returns the sha256 digest of an OCI image as a string

func DigestPath

func DigestPath(image string) (string, error)

DigestPath returns the sha256 digest of an OCI image as a string that has been sanitized for safety as a file name

func Save

func Save(image, basePath string) error

Save creates a tar file in `basePath` with the sanitized `image` sha256 as the file name. This is probably not what you want to extract an image

func Write

func Write(image, basePath string) error

Types

type OCIManifest

type OCIManifest struct {
	SchemaVersion int `json:"schemaVersion"`
	Config        struct {
		MediaType string `json:"mediaType"`
		Digest    string `json:"digest"`
		Size      int    `json:"size"`
	} `json:"config"`
	Layers []struct {
		MediaType string `json:"mediaType"`
		Digest    string `json:"digest"`
		Size      int    `json:"size"`
	} `json:"layers"`
}

func Manifest

func Manifest(image string) (OCIManifest, error)

Manifest returns the container manifest of an OCI image

Jump to

Keyboard shortcuts

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