storage

package
v0.0.0-...-f2f6dc9 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2019 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BucketURL

type BucketURL string

BucketURL is the type for connecting to a common bucket

type Storage

type Storage struct {
	BucketURL BucketURL
}

Storage is the interface to the blob storage

func NewStorage

func NewStorage(bucketURL BucketURL) *Storage

NewStorage creates the storage struct with all the needed dependencies

func (*Storage) Delete

func (s *Storage) Delete(ctx context.Context, location string) error

Delete deletes an object from the cloud storage

func (*Storage) Read

func (s *Storage) Read(ctx context.Context, location string) (io.ReadCloser, error)

Read gets an object from the cloud storage

func (*Storage) Write

func (s *Storage) Write(ctx context.Context, location string, r io.Reader) error

Write adds an new object to the cloud storage

Jump to

Keyboard shortcuts

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