bpi

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: 9 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

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

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 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

Jump to

Keyboard shortcuts

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