blobstore

package
v0.0.136 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2016 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Blobstore

type Blobstore interface {
	Get(blobID string) (LocalBlob, error)
	Add(sourcePath string) (blobID string, err error)
}

func NewBlobstore

func NewBlobstore(davClient boshdavcli.Client, uuidGenerator boshuuid.Generator, fs boshsys.FileSystem, logger boshlog.Logger) Blobstore

type Config

type Config struct {
	Endpoint string
	Username string
	Password string
}

type Factory

type Factory interface {
	Create(string, *http.Client) (Blobstore, error)
}

func NewBlobstoreFactory

func NewBlobstoreFactory(uuidGenerator boshuuid.Generator, fs boshsys.FileSystem, logger boshlog.Logger) Factory

type LocalBlob

type LocalBlob interface {
	// Path returns the path to the local copy of the blob
	Path() string
	// Delete removes the local copy of the blob (does not effect the blobstore)
	Delete() error
	// DeleteSilently removes the local copy of the blob (does not effect the blobstore), logging instead of returning an error.
	DeleteSilently()
}

LocalBlob represents a local copy of a blob retrieved from the blobstore

func NewLocalBlob

func NewLocalBlob(path string, fs boshsys.FileSystem, logger boshlog.Logger) LocalBlob

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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