Skip to content

goforj/filesystem-rclone

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

filesystem logo

An opinionated, testable filesystem abstraction for Go - native drivers where you want control, optional rclone (via add-on) where you want breadth.

Testable. Explicit. Minimal surface area.

This is the rclone-backed implementation of the GoForj Filesystem Adapter interface. It provides access to a wide range of storage backends via rclone's capabilities, while adhering to the minimal and explicit API defined by the GoForj Filesystem Adapter.

Go Reference License: MIT Go Test Go version Latest tag Go Report Card

What is this?

Think “Laravel filesystem”, but Go-native, explicit, and testable.

A tiny, stable API over multiple storage backends:

type Filesystem interface {
    Get(ctx context.Context, p string) ([]byte, error)
    Put(ctx context.Context, p string, contents []byte) error
    Delete(ctx context.Context, p string) error
    Exists(ctx context.Context, p string) (bool, error)
    List(ctx context.Context, p string) ([]Entry, error)
    URL(ctx context.Context, p string) (string, error)
}

Install

go get github.com/goforj/filesystem-rclone

Rclone Backends (add-on)

See rclone docs for full details. Supported backends include:

Backend Notes
amazonclouddrive Amazon Cloud Drive
azureblob Microsoft Azure Blob
azurefiles Microsoft Azure Files
b2 Backblaze B2
box Box
cache Cache a remote
chunker Transparently chunk/split large files
combine Combine several remotes into one
compress Compress a remote
crypt Encrypt/decrypt a remote
drive Google Drive
dropbox Dropbox
fichier 1Fichier
filefabric Enterprise File Fabric
filescom Files.com
ftp FTP
gcs Google Cloud Storage (not Drive)
gphotos Google Photos
gofile Gofile
hasher Better checksums for other remotes
hdfs Hadoop distributed file system
hidrive HiDrive
http HTTP
imagekit ImageKit.io
internetarchive Internet Archive
jottacloud Jottacloud
koofr Koofr and compatibles
linkbox Linkbox
local Local disk
mailru Mail.ru Cloud
mega Mega
memory In-memory object storage
netstorage Akamai NetStorage
oos Oracle Object Storage
onedrive Microsoft OneDrive
opendrive OpenDrive
pcloud Pcloud
pikpak PikPak
pixeldrain Pixeldrain
premiumizeme premiumize.me
protondrive Proton Drive
putio Put.io
qingstor QingCloud Object Storage
quatrix Quatrix by Maytech
s3 Amazon S3-compatible providers
seafile Seafile
sftp SSH/SFTP
sia Sia Decentralized Cloud
smb SMB / CIFS
storj / tardigrade Storj Decentralized Cloud Storage
sugarsync Sugarsync
swift OpenStack Swift
ulozto Uloz.to
union Union of multiple remotes
uptobox Uptobox
webdav WebDAV
yandex Yandex Disk
zoho Zoho