filesystem

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Local = "local"
	Cloud = "cloud"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type FS

type FS struct {
	Filesystem  Filesystem
	Driver      string
	Dir         string
	Client      *minio.Client
	StorageName string
}

type Filesystem

type Filesystem interface {
	List() ([]string, error)
	Read(path string) ([]byte, error)
	Create(path string, data []byte) error
	Remove(path string) error
}

func CreateCloudFilesystem

func CreateCloudFilesystem(ctx context.Context, dir string, storageName string, client *minio.Client) Filesystem

func CreateLocalFilesystem

func CreateLocalFilesystem(dir string) Filesystem

Jump to

Keyboard shortcuts

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