config

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: May 3, 2020 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init(configFilePath string) error

func ShowUsing

func ShowUsing()

Types

type BuildVars

type BuildVars struct {
	// Version
	Version string
	// Timestamp
	Timestamp string
	// Git commit
	GitCommit string
}

BuildVars build details

type Configuration

type Configuration struct {
	Rclone   RcloneConfig
	Uploader []UploaderConfig
	Syncer   []SyncerConfig
}
var (

	// Config exports the config object
	Config *Configuration
)

type RcloneConfig

type RcloneConfig struct {
	Path                  string
	Config                string
	Stats                 string
	DryRun                bool                    `mapstructure:"dry_run"`
	ServiceAccountRemotes map[string]string       `mapstructure:"service_account_remotes"`
	GlobalParams          map[string]RcloneParams `mapstructure:"global_params"`
}

type RcloneParams added in v0.3.1

type RcloneParams struct {
	Copy           []string
	Move           []string
	MoveServerSide []string `mapstructure:"move_server_side"`
	Sync           []string
	Dedupe         []string
}

type RcloneServerSide

type RcloneServerSide struct {
	From string
	To   string
}

type RuntimeConfig

type RuntimeConfig struct {
	Verbose int
	Config  string
	Cache   string
	Log     string
	Version bool
}

type SyncerConfig

type SyncerConfig struct {
	Name         string
	Enabled      bool
	SourceRemote string `mapstructure:"source_remote"`
	Remotes      SyncerRemotes
	RcloneParams SyncerRcloneParams `mapstructure:"rclone_params"`
}

type SyncerRcloneParams

type SyncerRcloneParams struct {
	Copy                 []string
	GlobalCopy           string `mapstructure:"global_copy"`
	Sync                 []string
	GlobalSync           string   `mapstructure:"global_sync"`
	MoveServerSide       []string `mapstructure:"move_server_side"`
	GlobalMoveServerSide string   `mapstructure:"global_move_server_side"`
	Dedupe               []string
	GlobalDedupe         string `mapstructure:"global_dedupe"`
}

type SyncerRemotes

type SyncerRemotes struct {
	Copy           []string
	Sync           []string
	MoveServerSide []RcloneServerSide `mapstructure:"move_server_side"`
	Dedupe         []string
}

type UploaderCheck

type UploaderCheck struct {
	Forced  bool
	Type    string
	Limit   uint64
	Exclude []string
	Include []string
}

type UploaderConfig

type UploaderConfig struct {
	Name         string
	Enabled      bool
	Check        UploaderCheck
	Hidden       UploaderHidden
	LocalFolder  string `mapstructure:"local_folder"`
	Remotes      UploaderRemotes
	RcloneParams UploaderRcloneParams `mapstructure:"rclone_params"`
}

type UploaderHidden

type UploaderHidden struct {
	Enabled bool
	Type    string
	Folder  string
	Cleanup bool
	Workers int
}

type UploaderRcloneParams

type UploaderRcloneParams struct {
	Copy                 []string
	GlobalCopy           string `mapstructure:"global_copy"`
	Move                 []string
	GlobalMove           string   `mapstructure:"global_move"`
	MoveServerSide       []string `mapstructure:"move_server_side"`
	GlobalMoveServerSide string   `mapstructure:"global_move_server_side"`
	Dedupe               []string
	GlobalDedupe         string `mapstructure:"global_dedupe"`
}

type UploaderRemotes

type UploaderRemotes struct {
	Clean          []string
	Copy           []string
	Move           string
	MoveServerSide []RcloneServerSide `mapstructure:"move_server_side"`
	Dedupe         []string
}

Jump to

Keyboard shortcuts

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