rclone

package
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 4, 2021 License: GPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CmdCopy       string = "copy"
	CmdMove       string = "move"
	CmdSync       string = "sync"
	CmdDeleteFile string = "deletefile"
	CmdDeleteDir  string = "rmdir"
	CmdDeleteDirs string = "rmdirs"
	CmdDedupe     string = "dedupe"
)
View Source
const (
	ExitSuccess int = iota
	ExitSyntaxError
	ExitErrorUnknown
	ExitDirectoryNotFound
	ExitFileNotFound
	ExitTemporaryError
	ExitLessSeriousError
	ExitFatalError
	ExitTransferExceeded
)

Variables

This section is empty.

Functions

func AnyRemotesBanned

func AnyRemotesBanned(remotes []string) (bool, time.Time)

func ConfigToEnv added in v0.4.0

func ConfigToEnv(section, name string) string

credits: https://github.com/rclone/rclone/blob/master/fs/config.go

func Copy

func Copy(from string, to string, serviceAccounts []*RemoteServiceAccount,
	additionalRcloneParams []string) (bool, int, error)

func Dedupe

func Dedupe(remotePath string, additionalRcloneParams []string) (bool, int, error)

func DeleteFile

func DeleteFile(remoteFilePath string) (bool, int, error)

func GetGlobalParams added in v0.3.1

func GetGlobalParams(gp GlobalParamType, name string) []string

func IncludeExcludeToFilters added in v0.2.3

func IncludeExcludeToFilters(includes []string, excludes []string) []string

func Init

func Init(c *config.Configuration) error

func Move

func Move(from string, to string, serviceAccounts []*RemoteServiceAccount, serverSide bool,
	additionalRcloneParams []string) (bool, int, error)

func RemoveServiceAccountsFromTempCache added in v0.4.0

func RemoveServiceAccountsFromTempCache(serviceAccounts []*RemoteServiceAccount)

func RmDir

func RmDir(remoteFilePath string) (bool, int, error)

func Sync

func Sync(from string, to string, serviceAccounts []*RemoteServiceAccount,
	additionalRcloneParams []string) (bool, int, error)

Types

type GlobalParamType added in v0.3.1

type GlobalParamType int
const (
	GlobalCopyParams GlobalParamType = iota
	GlobalMoveParams
	GlobalMoveServerSideParams
	GlobalSyncParams
	GlobalDedupeParams
)

type RemoteInstruction

type RemoteInstruction struct {
	From       string
	To         string
	ServerSide bool
}

type RemoteServiceAccount added in v0.2.0

type RemoteServiceAccount struct {
	RemoteEnvVar       string
	ServiceAccountPath string
}

type RemoteServiceAccounts added in v0.2.0

type RemoteServiceAccounts struct {
	RemoteEnvVar    string
	ServiceAccounts []pathutils.Path
}

type ServiceAccountManager added in v0.2.0

type ServiceAccountManager struct {
	// contains filtered or unexported fields
}

func NewServiceAccountManager added in v0.2.0

func NewServiceAccountManager(serviceAccountFolders map[string][]string, parallelism int) *ServiceAccountManager

func (*ServiceAccountManager) GetRandomServiceAccount added in v0.4.0

func (m *ServiceAccountManager) GetRandomServiceAccount(remotePath string) (string, error)

func (*ServiceAccountManager) GetServiceAccount added in v0.2.0

func (m *ServiceAccountManager) GetServiceAccount(remotePaths ...string) ([]*RemoteServiceAccount, error)

func (*ServiceAccountManager) LoadServiceAccounts added in v0.2.0

func (m *ServiceAccountManager) LoadServiceAccounts(remotePaths []string) error

func (*ServiceAccountManager) ServiceAccountsCount added in v0.2.0

func (m *ServiceAccountManager) ServiceAccountsCount() int

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL