config

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2020 License: GPL-3.0 Imports: 7 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 map[string]UploaderConfig
	Syncer   map[string]SyncerConfig
}
var (

	// Config exports the config object
	Config *Configuration
)

func (Configuration) ToJsonString

func (cfg Configuration) ToJsonString() (string, error)

type RcloneConfig

type RcloneConfig struct {
	Path   string
	Config string
	Stats  string
	DryRun bool `mapstructure:"dry_run"`
}

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 {
	Enabled              bool
	ServiceAccountFolder string `mapstructure:"sa_folder"`
	SourceRemote         string `mapstructure:"source_remote"`
	Remotes              SyncerRemotes
	RcloneParams         SyncerRcloneParams `mapstructure:"rclone_params"`
}

type SyncerRcloneParams

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

type SyncerRemotes

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

type UploaderCheck

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

type UploaderConfig

type UploaderConfig struct {
	Enabled              bool
	Check                UploaderCheck
	Hidden               UploaderHidden
	LocalFolder          string `mapstructure:"local_folder"`
	ServiceAccountFolder string `mapstructure:"sa_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
	Move           []string
	MoveServerSide []string `mapstructure:"move_server_side"`
	Dedupe         []string
}

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