storage

package
v1.14.4 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotExist = errors.New("no such file")

ErrNotExist is an error for file isn't exists on storage

Functions

This section is empty.

Types

type FileInfo

type FileInfo struct {
	Name string // with path
	Size int64
}

type Storage

type Storage interface {
	Save(name string, data io.Reader, size int) error
	SourceReader(name string) (io.ReadCloser, error)
	// FileStat returns file info. It returns error if file is empty or not exists
	FileStat(name string) (FileInfo, error)
	List(prefix string) ([]FileInfo, error)
	Files(suffix string) ([][]byte, error)
	// Delete deletes given file.
	// It returns storage.ErrNotExist if a file isn't exists
	Delete(name string) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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