Documentation ¶
Index ¶
- func BlobAccess(mime string, path string, fss ...vfs.FileSystem) bpi.BlobAccess
- func BlobAccessForTemporaryFile(mime string, temp vfs.File, opts ...Option) bpi.BlobAccess
- func BlobAccessForTemporaryFilePath(mime string, temp string, opts ...Option) bpi.BlobAccess
- func BlobAccessWithCloser(closer io.Closer, mime string, path string, fss ...vfs.FileSystem) bpi.BlobAccess
- func DataAccess(fs vfs.FileSystem, path string) bpi.DataAccess
- func Provider(mime string, path string, fss ...vfs.FileSystem) bpi.BlobAccessProvider
- type Option
- type Options
- type TempFile
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BlobAccess ¶
func BlobAccess(mime string, path string, fss ...vfs.FileSystem) bpi.BlobAccess
BlobAccess wraps a file path into a BlobAccess, which does not need a close.
func BlobAccessForTemporaryFilePath ¶
func BlobAccessForTemporaryFilePath(mime string, temp string, opts ...Option) bpi.BlobAccess
func BlobAccessWithCloser ¶
func BlobAccessWithCloser(closer io.Closer, mime string, path string, fss ...vfs.FileSystem) bpi.BlobAccess
func DataAccess ¶
func DataAccess(fs vfs.FileSystem, path string) bpi.DataAccess
func Provider ¶
func Provider(mime string, path string, fss ...vfs.FileSystem) bpi.BlobAccessProvider
Types ¶
type Option ¶
type Option = optionutils.Option[*Options]
func WithDigest ¶
func WithDigest(d digest.Digest) Option
func WithFileSystem ¶
func WithFileSystem(fss ...vfs.FileSystem) Option
type Options ¶
type Options struct { // FileSystem defines the file system that contains the specified directory. FileSystem vfs.FileSystem Digest digest.Digest Size *int64 }
type TempFile ¶
type TempFile struct {
// contains filtered or unexported fields
}
TempFile holds a temporary file that should be kept open. Close should never be called directly. It can be passed to another responsibility realm by calling Release- For example to be transformed into a TemporaryBlobAccess. Close will close and remove an unreleased file and does nothing if it has been released. If it has been released the new realm is responsible. to close and remove it.
func NewTempFile ¶
func (*TempFile) Close ¶
Close closes and removes the temporary file as long it has not been released before by calling Release.
func (*TempFile) FileSystem ¶
func (t *TempFile) FileSystem() vfs.FileSystem
Click to show internal directories.
Click to hide internal directories.