Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidCredentials = errors.New("invalid credentials")
Functions ¶
Types ¶
type Config ¶
type Config struct {
// Username of put.io account.
Username string
// Password of put.io account.
// An OAuth token can be used instead of password.
// Token must be prefixed with "token/" (without quotes).
// In that case, Username is not required.
Password string
// Sync files to/from this dir in computer.
LocalDir string
// Do not make changes on filesystems. Only calculate what needs to be done.
DryRun bool
// Stop after first sync operation.
// Otherwise, sync operation is repeated continuously while waiting for some duration between syncs.
// If there is authentication error, Sync also returns since there is no point in retrying in this case.
Once bool
// Listen address for HTTP server.
// The server has an endpoint for getting the status of the sync operation.
Server string
// Set log level to debug.
Debug bool
}
type ConfigError ¶ added in v2.0.24
type ConfigError struct {
Reason string
}
func (*ConfigError) Error ¶ added in v2.0.24
func (e *ConfigError) Error() string
Source Files
¶
Click to show internal directories.
Click to hide internal directories.