fs

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: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Storage

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

Storage stores blobs on FileSystem

func NewStorage

func NewStorage(path string) *Storage

NewStorage creates a new FileSystem 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