Documentation ¶
Index ¶
- Constants
- Variables
- func Cast[I interface{}](acc BlobAccess) I
- func ErrBlobNotFound(digest digest.Digest) error
- func IsErrBlobNotFound(err error) bool
- type BlobAccess
- type BlobAccessBase
- type BlobAccessProvider
- type BlobAccessProviderFunction
- type DataAccess
- type DataGetter
- type DataReader
- type DataSource
- type DigestSource
- type FileLocation
- type MimeType
- type StaticBlobAccess
- type Validatable
Constants ¶
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 ¶
var ErrClosed = refmgmt.ErrClosed
Functions ¶
func Cast ¶
func Cast[I interface{}](acc BlobAccess) I
func ErrBlobNotFound ¶
func ErrBlobNotFound(digest digest.Digest) error
func IsErrBlobNotFound ¶
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 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