backend

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backend

type Backend interface {
	List(path string, recursive bool) ([]string, error)
	Stat(filepath string) (FileInfo, error)
	Read(filepath string) ([]byte, error)
	ReadString(filepath string) (string, error)
	ReadStream(filepath string) (FileStream, error)
	Write(filepath string, data []byte) error
	WriteString(filepath string, content string) error
	WriteStream(filepath string, stream io.ReadCloser, length int64) error
	Move(filepathSrc string, filepathDst string) error
	Delete(filepath string) error
}

type FileInfo

type FileInfo struct {
	LastModified time.Time
	ETag         string
	ContentType  string
	Size         int64
}

type FileStream

type FileStream struct {
	Size        int64
	ContentType string
	Content     io.ReadCloser
}

Jump to

Keyboard shortcuts

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