uploadinfo

package
v0.0.0-...-c09a88c Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: Apache-2.0 Imports: 2 Imported by: 9

Documentation

Overview

Package uploadinfo provides a way to move metadata and/or actual data on blobs to be uploaded.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Entry

type Entry struct {
	Digest   digest.Digest
	Contents []byte
	Path     string
	// contains filtered or unexported fields
}

Entry should remain immutable upon creation. Should be created using constructor. Only Contents or Path must be set. In case of a malformed entry, Contents takes precedence over Path.

func EntryFromBlob

func EntryFromBlob(blob []byte) *Entry

EntryFromBlob creates an Entry from an in memory blob.

func EntryFromFile

func EntryFromFile(dg digest.Digest, path string) *Entry

EntryFromFile creates an entry from a file in disk.

func EntryFromProto

func EntryFromProto(msg proto.Message) (*Entry, error)

EntryFromProto creates an Entry from an in memory proto.

func EntryFromVirtualFile

func EntryFromVirtualFile(dg digest.Digest, path string) *Entry

EntryFromVirtualFile creates an entry from a file not on disk. The digest is expected to exist in the CAS.

func (*Entry) IsBlob

func (ue *Entry) IsBlob() bool

IsBlob returns whether this Entry is for a blob in memory.

func (*Entry) IsFile

func (ue *Entry) IsFile() bool

IsFile returns whether this Entry is for a file in disk.

func (*Entry) IsVirtualFile

func (ue *Entry) IsVirtualFile() bool

IsVirtualFile returns whether this Entry is a virtual file.

Jump to

Keyboard shortcuts

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