config

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: 5 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 Configuration

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

type RcloneConfig

type RcloneConfig struct {
	Path                  string                  `yaml:"path"`
	Config                string                  `yaml:"config"`
	Stats                 string                  `yaml:"stats"`
	LiveRotate            bool                    `yaml:"live_rotate"`
	DryRun                bool                    `yaml:"dry_run"`
	ServiceAccountRemotes map[string][]string     `yaml:"service_account_remotes"`
	GlobalParams          map[string]RcloneParams `yaml:"global_params"`
}

type RcloneParams added in v0.3.1

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

type RcloneServerSide

type RcloneServerSide struct {
	From string
	To   string
}

type SyncerConfig

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

type SyncerRcloneParams

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

type SyncerRemotes

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

type UploaderCheck

type UploaderCheck struct {
	Forced       bool
	MinFreeSpace uint64 `yaml:"min_free_space"`
	Type         string
	Limit        uint64
	Exclude      []string
	Include      []string
}

type UploaderConfig

type UploaderConfig struct {
	Name         string
	Enabled      bool
	Check        UploaderCheck
	Hidden       UploaderHidden
	LocalFolder  string `yaml:"local_folder"`
	Remotes      UploaderRemotes
	RcloneParams UploaderRcloneParams `yaml:"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 `yaml:"global_copy"`
	Move                 []string
	GlobalMove           string   `yaml:"global_move"`
	MoveServerSide       []string `yaml:"move_server_side"`
	GlobalMoveServerSide string   `yaml:"global_move_server_side"`
	Dedupe               []string
	GlobalDedupe         string `yaml:"global_dedupe"`
}

type UploaderRemotes

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

Jump to

Keyboard shortcuts

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