localfs

package
v2.2.2+incompatible Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2020 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LocalfsBackend

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

func NewLocalfsBackend

func NewLocalfsBackend(metaPath string, filesPath string) LocalfsBackend

func (LocalfsBackend) Delete

func (b LocalfsBackend) Delete(key string) (err error)

func (LocalfsBackend) Exists

func (b LocalfsBackend) Exists(key string) (bool, error)

func (LocalfsBackend) Get

func (b LocalfsBackend) Get(key string) (metadata backends.Metadata, f io.ReadCloser, err error)

func (LocalfsBackend) Head

func (b LocalfsBackend) Head(key string) (metadata backends.Metadata, err error)

func (LocalfsBackend) List

func (b LocalfsBackend) List() ([]string, error)

func (LocalfsBackend) Put

func (b LocalfsBackend) Put(key string, r io.Reader, expiry time.Time, deleteKey, accessKey string) (m backends.Metadata, err error)

func (LocalfsBackend) PutMetadata

func (b LocalfsBackend) PutMetadata(key string, m backends.Metadata) (err error)

func (LocalfsBackend) Size

func (b LocalfsBackend) Size(key string) (int64, error)

type MetadataJSON

type MetadataJSON struct {
	DeleteKey    string   `json:"delete_key"`
	AccessKey    string   `json:"access_key,omitempty"`
	Sha256sum    string   `json:"sha256sum"`
	Mimetype     string   `json:"mimetype"`
	Size         int64    `json:"size"`
	Expiry       int64    `json:"expiry"`
	ArchiveFiles []string `json:"archive_files,omitempty"`
}

Jump to

Keyboard shortcuts

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