Documentation
¶
Index ¶
- func NewFromConfig(diskConfigs []*fs.DiskConfig, localRoot string) ([]fs.Disk, error)
- func NewLocal(config *RcloneLocalConfig) (fs.Disk, error)
- func NewS3(config *RcloneS3Config) (fs.Disk, error)
- type BaseRcloneDisk
- func (r *BaseRcloneDisk) Delete(ctx context.Context, filePath string) error
- func (r *BaseRcloneDisk) IsAllowedMime(mime string) bool
- func (r *BaseRcloneDisk) Name() string
- func (r *BaseRcloneDisk) Put(ctx context.Context, file *fs.File) (*fs.File, error)
- func (r *BaseRcloneDisk) PutMultipart(ctx context.Context, m *multipart.FileHeader, dsts ...string) (*fs.File, error)
- func (r *BaseRcloneDisk) PutReader(ctx context.Context, reader io.Reader, size uint64, fileType, dst string) (*fs.File, 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 ¶
Types ¶
type BaseRcloneDisk ¶
type BaseRcloneDisk struct {
rclonefs.Fs
DiskName string `json:"name"`
Root string
GetURL func(string) string
}
func (*BaseRcloneDisk) Delete ¶
func (r *BaseRcloneDisk) Delete(ctx context.Context, filePath string) error
func (*BaseRcloneDisk) IsAllowedMime ¶
func (r *BaseRcloneDisk) IsAllowedMime(mime string) bool
func (*BaseRcloneDisk) Name ¶
func (r *BaseRcloneDisk) Name() string
func (*BaseRcloneDisk) PutMultipart ¶
func (r *BaseRcloneDisk) PutMultipart( ctx context.Context, m *multipart.FileHeader, dsts ...string, ) (*fs.File, error)
func (*BaseRcloneDisk) UploadFilePath ¶
func (r *BaseRcloneDisk) UploadFilePath(filename string) string
type RcloneLocal ¶
type RcloneLocal struct {
*BaseRcloneDisk
// contains filtered or unexported fields
}
func (*RcloneLocal) LocalPublicPath ¶ added in v0.0.5
func (r *RcloneLocal) LocalPublicPath() string
func (*RcloneLocal) Root ¶
func (r *RcloneLocal) Root() string
func (*RcloneLocal) URL ¶
func (r *RcloneLocal) URL(filepath string) string
type RcloneLocalConfig ¶
type RcloneS3 ¶
type RcloneS3 struct {
*BaseRcloneDisk
// contains filtered or unexported fields
}
func (*RcloneS3) LocalPublicPath ¶ added in v0.0.5
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"`
CopyCutoff rclonefs.SizeSuffix `json:"copy_cutoff"`
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.