Documentation ¶
Index ¶
- func OptionsToCLIFlags(regInfo *fs.RegInfo) *cli.Command
- type DefaultHandlerResolver
- type EmptyReadCloser
- type Entry
- type Handler
- type HandlerResolver
- type RCloneHandler
- func (h RCloneHandler) Check(ctx context.Context, path string) (fs.DirEntry, error)
- func (h RCloneHandler) List(ctx context.Context, path string) ([]fs.DirEntry, error)
- func (h RCloneHandler) Read(ctx context.Context, path string, offset int64, length int64) (io.ReadCloser, fs.Object, error)
- func (h RCloneHandler) Scan(ctx context.Context, path string, last string) <-chan Entry
- type ReadHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func OptionsToCLIFlags ¶
Types ¶
type DefaultHandlerResolver ¶
type DefaultHandlerResolver struct { }
type EmptyReadCloser ¶
type EmptyReadCloser struct{}
EmptyReadCloser is a ReadCloser that always returns EOF.
func (*EmptyReadCloser) Close ¶
func (e *EmptyReadCloser) Close() error
type Handler ¶
type Handler interface { // List lists the items at the given path. List(ctx context.Context, path string) ([]fs.DirEntry, error) // Scan scans the data source starting at the given path and returns a channel of entries. // The `last` parameter is used to resume scanning from the last entry returned by a previous scan. It is exclusive. // The returned entries must be sorted by path in ascending order. Scan(ctx context.Context, path string, last string) <-chan Entry // Check checks the size and last modified time of the item at the given path. Check(ctx context.Context, path string) (fs.DirEntry, error) ReadHandler }
Handler is an interface for scanning, reading, opening, and checking items in a data source.
type HandlerResolver ¶
type RCloneHandler ¶
func NewRCloneHandler ¶
type ReadHandler ¶ added in v0.1.0
type ReadHandler interface { // Read reads data from the data source starting at the given path and offset, and returns a ReadCloser. // The `length` parameter specifies the number of bytes to read. // This method is most likely used for retrieving a single block of data. Read(ctx context.Context, path string, offset int64, length int64) (io.ReadCloser, fs.Object, error) }
Click to show internal directories.
Click to hide internal directories.