Documentation
¶
Index ¶
- Constants
- Variables
- func DeleteToken()
- func DownloadBlob(ctx context.Context, image OciImageLink, digest digest.Digest, ...) (io.ReadCloser, error)
- func DownloadIndex(image OciImageLink) (v1.Index, error)
- func DownloadManifest(image OciImageLink, digest string) (io.ReadCloser, error)
- func GetFileSha(keys CacheKeys, dst []string) (string, string, error)
- func ReadConfig(configReader io.ReadCloser) (v1.Image, error)
- func ReadIndex(indexReader io.ReadCloser) (v1.Index, error)
- func ReadManifest(manifestReader io.ReadCloser) (v1.Manifest, int64, string, error)
- func UploadBlob(link OciImageLink, blobReader io.ReadCloser, contentLength int, token string) (string, error)
- func UploadManifest(link OciImageLink, indexBytes []byte, mediaType string, token string) (string, error)
- type Base64Reader
- type CacheKeys
- type FieldExporter
- type FileCacheKey
- type Image
- type ManifestMediaType
- type OciImageLink
Constants ¶
View Source
const ( // DefaultRegistry is the default registry to use DefaultRegistry = "index.docker.io" // IndexStoreContextKey is the context key for the index store IndexStoreContextKey contextKeyType = "indexStore" // BlobStoreContextKey is the context key for the blob store BlobStoreContextKey contextKeyType = "blobStore" // KeyStoreContextKey is the context key for the blob store KeyStoreContextKey contextKeyType = "keyStore" // 2dfs media type TwoDfsMediaType = "application/vnd.oci.image.layer.v1.2dfs.field" // image name annotation ImageNameAnnotation = "2dfs.image.name" )
Variables ¶
View Source
var PullPushProtocol = "https"
Functions ¶
func DeleteToken ¶
func DeleteToken()
func DownloadBlob ¶
func DownloadBlob(ctx context.Context, image OciImageLink, digest digest.Digest, mediaType string) (io.ReadCloser, error)
func DownloadIndex ¶
func DownloadIndex(image OciImageLink) (v1.Index, error)
func DownloadManifest ¶
func DownloadManifest(image OciImageLink, digest string) (io.ReadCloser, error)
func GetFileSha ¶
Given the file destination, and the CacheKeys, looks if any of the keys match the destination and returns the key and the sha of the file. Error otherwise.
func ReadConfig ¶
func ReadConfig(configReader io.ReadCloser) (v1.Image, error)
func ReadManifest ¶
ReadManifest returns manifest struct, manifest size, manifest digest
func UploadBlob ¶
func UploadBlob(link OciImageLink, blobReader io.ReadCloser, contentLength int, token string) (string, error)
func UploadManifest ¶
Types ¶
type Base64Reader ¶
type Base64Reader struct {
// contains filtered or unexported fields
}
func NewBase64Reader ¶
func NewBase64Reader(reader io.ReadCloser) *Base64Reader
func (*Base64Reader) Close ¶
func (r *Base64Reader) Close() error
type CacheKeys ¶
type CacheKeys struct {
Keys []FileCacheKey `json:"keys"`
}
type FieldExporter ¶
type FileCacheKey ¶
type Image ¶
type Image interface {
AddField(manifest filesystem.TwoDFsManifest, targetImage string) error
GetIndex() []byte
GetExporter(args ...string) (FieldExporter, error)
}
type ManifestMediaType ¶
type ManifestMediaType string
type OciImageLink ¶
Click to show internal directories.
Click to hide internal directories.