bpi

package
v0.18.0 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KIND_BLOB      = internal.KIND_BLOB
	KIND_MEDIATYPE = internal.KIND_MEDIATYPE

	BLOB_UNKNOWN_SIZE   = internal.BLOB_UNKNOWN_SIZE
	BLOB_UNKNOWN_DIGEST = internal.BLOB_UNKNOWN_DIGEST
)

Variables

View Source
var ErrClosed = refmgmt.ErrClosed

Functions

func Cast

func Cast[I interface{}](acc BlobAccess) I

func ErrBlobNotFound

func ErrBlobNotFound(digest digest.Digest) error

func IsErrBlobNotFound

func IsErrBlobNotFound(err error) bool

Types

type BlobAccess

type BlobAccess = internal.BlobAccess

func NewBlobAccessForBase

func NewBlobAccessForBase(acc BlobAccessBase, closer ...io.Closer) BlobAccess

type BlobAccessBase

type BlobAccessBase = internal.BlobAccessBase

func BaseAccessForDataAccess

func BaseAccessForDataAccess(mime string, acc DataAccess) BlobAccessBase

BaseAccessForDataAccess is used for a general data. It calculated the metadata on-the-fly for the content of the data access. The content may not be changing.

func BaseAccessForDataAccessAndMeta

func BaseAccessForDataAccessAndMeta(mime string, acc DataAccess, dig digest.Digest, size int64) BlobAccessBase

BaseAccessForDataAccessAndMeta provides a BlobAccessBase for a DataAccess adding the additional blob access metadata (mime, digest, and size). Digest and size can be set to unknown using the constants (BLOB_UNKNOWN_DIGEST and BLOB_UNKNOWN_SIZE).

type BlobAccessProvider

type BlobAccessProvider = internal.BlobAccessProvider

type BlobAccessProviderFunction

type BlobAccessProviderFunction func() (BlobAccess, error)

func (BlobAccessProviderFunction) BlobAccess

func (p BlobAccessProviderFunction) BlobAccess() (BlobAccess, error)

type DataAccess

type DataAccess = internal.DataAccess

type DataGetter

type DataGetter = internal.DataGetter

type DataReader

type DataReader = internal.DataReader

type DataSource

type DataSource = internal.DataSource

type DigestSource

type DigestSource = internal.DigestSource

type FileLocation

type FileLocation = internal.FileLocation

type MimeType

type MimeType = internal.MimeType

type StaticBlobAccess

type StaticBlobAccess interface {
	BlobAccess
	BlobAccessProvider
}

StaticBlobAccess is a BlobAccess which does not require finalization, therefore it can be used as BlobAccessProvider, also.

func ForStaticDataAccess

func ForStaticDataAccess(mime string, acc DataAccess) StaticBlobAccess

ForStaticDataAccess is used for a data access using no closer. They don't require a finalization and can be used as long as they exist. Therefore, no ref counting is required and they can be used as BlobAccessProvider, also.

func ForStaticDataAccessAndMeta

func ForStaticDataAccessAndMeta(mime string, acc DataAccess, dig digest.Digest, size int64) StaticBlobAccess

ForStaticDataAccessAndMeta provides a StaticBlobAccess for a DataAccess adding the additional blob access metadata (mime, digest, and size). Digest and size can be set to unknown using the constants (BLOB_UNKNOWN_DIGEST and BLOB_UNKNOWN_SIZE).

type Validatable

type Validatable = utils.Validatable

Jump to

Keyboard shortcuts

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