gofsbcklocal

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

Documentation

Index

Constants

View Source
const BACKEND_NAME = "local"
View Source
const DEFAULT_MIME_TYPE = "application/octet-stream"

Variables

This section is empty.

Functions

This section is empty.

Types

type LocalBackend

type LocalBackend struct {
	Config LocalConfig
	Mu     sync.Mutex
}

func New

func New(config LocalConfig) (*LocalBackend, error)

func (*LocalBackend) Delete

func (b *LocalBackend) Delete(filePath string) error

func (*LocalBackend) List

func (b *LocalBackend) List(path string, recursive bool) ([]string, error)

func (*LocalBackend) Move

func (b *LocalBackend) Move(filePathSrc string, filePathDst string) error

func (*LocalBackend) Read

func (b *LocalBackend) Read(filePath string) ([]byte, error)

func (*LocalBackend) ReadStream

func (b *LocalBackend) ReadStream(filePath string) (backend.FileStream, error)

func (*LocalBackend) ReadString

func (b *LocalBackend) ReadString(filePath string) (string, error)

func (*LocalBackend) Stat

func (b *LocalBackend) Stat(filePath string) (backend.FileInfo, error)

func (*LocalBackend) Write

func (b *LocalBackend) Write(filePath string, data []byte) error

func (*LocalBackend) WriteStream

func (b *LocalBackend) WriteStream(filePath string, stream io.ReadCloser, length int64) error

func (*LocalBackend) WriteString

func (b *LocalBackend) WriteString(filePath string, content string) error

type LocalConfig

type LocalConfig struct {
	BasePath string
	Debug    bool
}

Jump to

Keyboard shortcuts

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