rclonefs

package
v0.0.7-alpha Latest Latest
Warning

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

Go to latest
Published: May 30, 2022 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFromConfig

func NewFromConfig(config *fs.StorageConfig) []fs.FSDisk

func NewLocal

func NewLocal(cfg *RcloneLocalConfig) fs.FSDisk

func NewS3

func NewS3(cfg *RcloneS3Config) fs.FSDisk

Types

type BaseRcloneDisk

type BaseRcloneDisk struct {
	rclonefs.Fs
	DiskName string `json:"name"`
	Root     string
}

func (*BaseRcloneDisk) Name

func (r *BaseRcloneDisk) Name() string

func (*BaseRcloneDisk) Put

func (r *BaseRcloneDisk) Put(ctx context.Context, reader io.Reader, size int64, mime, dst string) (*fs.FileInfo, error)

func (*BaseRcloneDisk) PutMultipart

func (r *BaseRcloneDisk) PutMultipart(ctx context.Context, m *multipart.FileHeader, dsts ...string) (*fs.FileInfo, error)

func (*BaseRcloneDisk) UploadFilePath

func (r *BaseRcloneDisk) UploadFilePath(filename string) string

type RcloneLocal

type RcloneLocal struct {
	*BaseRcloneDisk
	Root      string        `json:"root"`
	BaseUrl   string        `json:"base_url"`
	BaseUrlFn func() string `json:"-"`
}

func (*RcloneLocal) Delete

func (r *RcloneLocal) Delete(ctx context.Context, filepath string) error

func (*RcloneLocal) Url

func (r *RcloneLocal) Url(filepath string) string

type RcloneLocalConfig

type RcloneLocalConfig struct {
	Name      string        `json:"name"`
	Root      string        `json:"root"`
	BaseUrl   string        `json:"base_url"`
	BaseUrlFn func() string `json:"-"`
}

type RcloneS3

type RcloneS3 struct {
	*BaseRcloneDisk
	Root            string              `json:"root"`
	Provider        string              `json:"provider"`
	Bucket          string              `json:"bucket"`
	Region          string              `json:"region"`
	Endpoint        string              `json:"endpoint"`
	ChunkSize       rclonefs.SizeSuffix `json:"chunk_size"`
	AccessKeyID     string              `json:"access_key_id"`
	SecretAccessKey string              `json:"secret_access_key"`
	BaseUrl         string              `json:"base_url"`
	ACL             string              `json:"acl"`
}

func (*RcloneS3) Delete

func (r *RcloneS3) Delete(ctx context.Context, filepath string) error

func (*RcloneS3) Url

func (r *RcloneS3) Url(filepath string) string

type RcloneS3Config

type RcloneS3Config struct {
	Name            string              `json:"name"`
	Root            string              `json:"root"`
	Provider        string              `json:"provider"`
	Bucket          string              `json:"bucket"`
	Region          string              `json:"region"`
	Endpoint        string              `json:"endpoint"`
	ChunkSize       rclonefs.SizeSuffix `json:"chunk_size"`
	AccessKeyID     string              `json:"access_key_id"`
	SecretAccessKey string              `json:"secret_access_key"`
	BaseUrl         string              `json:"base_url"`
	ACL             string              `json:"acl"`
}

Jump to

Keyboard shortcuts

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