interfaces

package
v1.8.2 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2024 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const DriverAws = "awss3"

DriverAws is returned as a name for the AWS Storage driver

View Source
const DriverLocal = "localstorage"

DriverLocal is returned as a name for the Local Storage driver

Variables

This section is empty.

Functions

This section is empty.

Types

type File

type File interface {
	// Exists returns true if the file exists
	Exists() bool
	// GetName returns the name of the file
	GetName() string
}

File contains information about the stored file

type System

type System interface {
	// Init sets the driver configurations and returns true if successful
	Init(input any) bool
	// IsAvailable returns true if the driver can be used
	IsAvailable() bool
	// GetSystemName returns the name of the driver
	GetSystemName() string
	// MoveToFilesystem moves a file from the local filesystem to the driver's filesystem
	MoveToFilesystem(sourceFile *os.File, metaData models.File) error
	// GetFile returns a File struct for the corresponding filename
	GetFile(filename string) File
	// FileExists returns true if the system contains a file with the given relative filepath
	FileExists(filepath string) (bool, error)
}

System is a driver for storing and retrieving files

Jump to

Keyboard shortcuts

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