blobstore

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: May 19, 2020 License: MIT Imports: 19 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetConfiguredBlobstore

func GetConfiguredBlobstore(c *config.Configurator) (interfaces.Blobstore, error)

Returns whatever blobstore is specified in the config.

Types

type AwsS3BlobStore

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

AWS stuff

func NewAwsS3BlobStore

func NewAwsS3BlobStore(awsConfig *config.AwsS3Config) (*AwsS3BlobStore, error)

func (*AwsS3BlobStore) BlobExists

func (a *AwsS3BlobStore) BlobExists(ctx context.Context, blobName string) (bool, error)

func (*AwsS3BlobStore) DeleteBlob

func (a *AwsS3BlobStore) DeleteBlob(ctx context.Context, blobName string) error

func (*AwsS3BlobStore) ReadBlob

func (a *AwsS3BlobStore) ReadBlob(ctx context.Context, blobName string) ([]byte, error)

func (*AwsS3BlobStore) WriteBlob

func (a *AwsS3BlobStore) WriteBlob(ctx context.Context, blobName string, data []byte) (int, error)

type DiskBlobStore

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

A Disk-based blob storage implementation that reads and writes blobs to/from files.

func NewDiskBlobStore

func NewDiskBlobStore(rootDir string) *DiskBlobStore

func (*DiskBlobStore) BlobExists

func (d *DiskBlobStore) BlobExists(ctx context.Context, blobName string) (bool, error)

func (*DiskBlobStore) DeleteBlob

func (d *DiskBlobStore) DeleteBlob(ctx context.Context, blobName string) error

func (*DiskBlobStore) ReadBlob

func (d *DiskBlobStore) ReadBlob(ctx context.Context, blobName string) ([]byte, error)

func (*DiskBlobStore) WriteBlob

func (d *DiskBlobStore) WriteBlob(ctx context.Context, blobName string, data []byte) (int, error)

type GCSBlobStore

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

GCSBlobStore implements the blobstore API on top of the google cloud storage API.

func NewGCSBlobStore

func NewGCSBlobStore(bucketName, projectID string, opts ...option.ClientOption) (*GCSBlobStore, error)

func (*GCSBlobStore) BlobExists

func (g *GCSBlobStore) BlobExists(ctx context.Context, blobName string) (bool, error)

func (*GCSBlobStore) DeleteBlob

func (g *GCSBlobStore) DeleteBlob(ctx context.Context, blobName string) error

func (*GCSBlobStore) ReadBlob

func (g *GCSBlobStore) ReadBlob(ctx context.Context, blobName string) ([]byte, error)

func (*GCSBlobStore) WriteBlob

func (g *GCSBlobStore) WriteBlob(ctx context.Context, blobName string, data []byte) (int, error)

Jump to

Keyboard shortcuts

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