mirror of
https://github.com/rclone/rclone.git
synced 2025-12-06 00:03:32 +00:00
fs: change Config callback into state based callback #3455
This is a very large change which turns the post Config function in backends into a state based call and response system so that alternative user interfaces can be added. The existing config logic has been converted, but it is quite complicated and folloup commits will likely be needed to fix it! Follow up commits will add a command line and API based way of using this configuration system.
This commit is contained in:
4
fs/fs.go
4
fs/fs.go
@@ -88,8 +88,8 @@ type RegInfo struct {
|
||||
// object, then it should return an Fs which which points to
|
||||
// the parent of that object and ErrorIsFile.
|
||||
NewFs func(ctx context.Context, name string, root string, config configmap.Mapper) (Fs, error) `json:"-"`
|
||||
// Function to call to help with config
|
||||
Config func(ctx context.Context, name string, config configmap.Mapper) error `json:"-"`
|
||||
// Function to call to help with config - see docs for ConfigIn for more info
|
||||
Config func(ctx context.Context, name string, m configmap.Mapper, configIn ConfigIn) (*ConfigOut, error) `json:"-"`
|
||||
// Options for the Fs configuration
|
||||
Options Options
|
||||
// The command help, if any
|
||||
|
||||
Reference in New Issue
Block a user