s3

package
v0.18.0 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2019 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultClient *s3.S3

DefaultClient is an S3 Client

Functions

This section is empty.

Types

type Storage

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

Storage stores blobs on an S3 compatible service

func NewStorage

func NewStorage(bucket string) *Storage

NewStorage creates a S3 compatible service storage

func (*Storage) Delete

func (s *Storage) Delete(key string) error

Delete a blob with given key

func (*Storage) Get

func (s *Storage) Get(key string) (*blob.Blob, error)

Get returns a blob with given key

func (*Storage) Put

func (s *Storage) Put(key string, content []byte, contentType string) error

Put a blob with given key and content. Blobs with same key are replaced.

func (*Storage) SetCurrentTenant

func (s *Storage) SetCurrentTenant(tenant *models.Tenant)

SetCurrentTenant to current context

Jump to

Keyboard shortcuts

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