Documentation ¶
Index ¶
- func NewFromConfig(config *fs.StorageConfig) []fs.FSDisk
- func NewLocal(cfg *RcloneLocalConfig) fs.FSDisk
- func NewS3(cfg *RcloneS3Config) fs.FSDisk
- type BaseRcloneDisk
- func (r *BaseRcloneDisk) Name() string
- func (r *BaseRcloneDisk) Put(ctx context.Context, reader io.Reader, size int64, mime, dst string) (*fs.FileInfo, error)
- func (r *BaseRcloneDisk) PutMultipart(ctx context.Context, m *multipart.FileHeader, dsts ...string) (*fs.FileInfo, error)
- func (r *BaseRcloneDisk) UploadFilePath(filename string) string
- type RcloneLocal
- type RcloneLocalConfig
- type RcloneS3
- type RcloneS3Config
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 ¶
func (*BaseRcloneDisk) Name ¶
func (r *BaseRcloneDisk) Name() string
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 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"` }
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"` }
Click to show internal directories.
Click to hide internal directories.