blobstore

package
v2.23.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrBlobIDEmpty = fmt.Errorf("blobstore: BlobID is empty")

ErrBlobIDEmpty is returned when the BlobID is empty

Functions

This section is empty.

Types

type Blobstore

type Blobstore struct {
	// contains filtered or unexported fields
}

Blobstore provides an interface to an filesystem based blobstore

func New

func New(root string) (*Blobstore, error)

New returns a new Blobstore

func (*Blobstore) Delete

func (bs *Blobstore) Delete(node *node.Node) error

Delete deletes a blob from the blobstore

func (*Blobstore) Download

func (bs *Blobstore) Download(node *node.Node) (io.ReadCloser, error)

Download retrieves a blob from the blobstore for reading

func (*Blobstore) List added in v2.20.0

func (bs *Blobstore) List() ([]*node.Node, error)

List lists all blobs in the Blobstore

func (*Blobstore) Path added in v2.20.0

func (bs *Blobstore) Path(node *node.Node) string

func (*Blobstore) Upload

func (bs *Blobstore) Upload(node *node.Node, source string) error

Upload stores some data in the blobstore under the given key

Jump to

Keyboard shortcuts

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