Documentation
¶
Overview ¶
Package config reads, writes and edits the config file and deals with command line flags
Index ¶
- Constants
- Variables
- func Authorize(args []string, noAutoBrowser bool)
- func ChangePassword(name string) string
- func Choose(what string, defaults, help []string, newOk bool) string
- func ChooseNumber(what string, min, max int) int
- func ChooseOption(o *fs.Option, name string) string
- func ChooseRemote() string
- func Command(commands []string) byte
- func CommandDefault(commands []string, defaultIndex int) byte
- func Confirm(Default bool) bool
- func ConfirmWithConfig(m configmap.Getter, configName string, Default bool) bool
- func CopyRemote(name string)
- func CreateRemote(name string, provider string, keyValues rc.Params, doObscure, noObscure bool) error
- func DeleteRemote(name string)
- func Dump() error
- func DumpRcBlob() (dump rc.Params)
- func DumpRcRemote(name string) (dump rc.Params)
- func EditConfig()
- func EditRemote(ri *fs.RegInfo, name string)
- func FileDeleteKey(section, key string) bool
- func FileGet(section, key string, defaultVal ...string) string
- func FileGetFlag(section, key string) (string, bool)
- func FileGetFresh(section, key string) (value string, err error)
- func FileRefresh() error
- func FileSections() []string
- func FileSet(section, key, value string)
- func GetPassword(prompt string) string
- func JSONListProviders() error
- func LoadConfig()
- func MustFindByName(name string) *fs.RegInfo
- func NewRemote(name string)
- func NewRemoteName() (name string)
- func OkRemote(name string) bool
- func PasswordRemote(name string, keyValues rc.Params) error
- func ReadNonEmptyLine(prompt string) string
- func ReadPassword() string
- func RemoteConfig(name string)
- func RenameRemote(name string)
- func SaveConfig()
- func SetPassword()
- func SetValueAndSave(name, key, value string) (err error)
- func ShowConfig()
- func ShowConfigLocation()
- func ShowRemote(name string)
- func ShowRemotes()
- func UpdateRemote(name string, keyValues rc.Params, doObscure, noObscure bool) error
Constants ¶
View Source
const ( // ConfigToken is the key used to store the token under ConfigToken = "token" // ConfigClientID is the config key used to store the client id ConfigClientID = "client_id" // ConfigClientSecret is the config key used to store the client secret ConfigClientSecret = "client_secret" // ConfigAuthURL is the config key used to store the auth server endpoint ConfigAuthURL = "auth_url" // ConfigTokenURL is the config key used to store the token server endpoint ConfigTokenURL = "token_url" // ConfigEncoding is the config key to change the encoding for a backend ConfigEncoding = "encoding" // ConfigEncodingHelp is the help for ConfigEncoding ConfigEncodingHelp = "This sets the encoding for the backend.\n\nSee: the [encoding section in the overview](/overview/#encoding) for more info." // ConfigAuthorize indicates that we just want "rclone authorize" ConfigAuthorize = "config_authorize" // ConfigAuthNoBrowser indicates that we do not want to open browser ConfigAuthNoBrowser = "config_auth_no_browser" )
Variables ¶
View Source
var ( // ConfigPath points to the config file ConfigPath = makeConfigPath() // CacheDir points to the cache directory. Users of this // should make a subdirectory and use MkdirAll() to create it // and any parents. CacheDir = makeCacheDir() // output of prompt for password PasswordPromptOutput =