internal

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: May 17, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KIND_BLOB      = "blob"
	KIND_MEDIATYPE = "media type"

	BLOB_UNKNOWN_SIZE   = int64(-1)
	BLOB_UNKNOWN_DIGEST = digest.Digest("")
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BlobAccess

type BlobAccess interface {
	BlobAccessBase

	// Dup provides a new independently closable view.
	Dup() (BlobAccess, error)
}

BlobAccess describes the access to a blob.

type BlobAccessBase

type BlobAccessBase interface {
	DataAccess
	DigestSource
	MimeType

	// DigestKnown reports whether digest is already known
	DigestKnown() bool
	// Size returns the blob size
	Size() int64
}

BlobAccessBase describes the access to a blob.

type BlobAccessProvider

type BlobAccessProvider interface {
	BlobAccess() (BlobAccess, error)
}

type DataAccess

type DataAccess interface {
	DataGetter
	DataReader
	io.Closer
}

DataAccess describes the access to sequence of bytes.

type DataGetter

type DataGetter interface {
	// Get returns the content as byte array
	Get() ([]byte, error)
}

type DataReader

type DataReader interface {
	// Reader returns a reader to incrementally access byte stream content
	Reader() (io.ReadCloser, error)
}

type DataSource

type DataSource interface {
	DataAccess
	Origin() string
}

DataSource describes some data plus its origin.

type DigestSource

type DigestSource interface {
	// Digest returns the blob digest
	Digest() digest.Digest
}

type FileLocation

type FileLocation interface {
	FileSystem() vfs.FileSystem
	Path() string
}

type MimeType

type MimeType interface {
	// MimeType returns the mime type of the blob
	MimeType() string
}

Jump to

Keyboard shortcuts

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