Documentation ¶
Overview ¶
Package gosync implements backup and restore between a local file directory and an Amazon AWS S3 bucket.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
Config defines the configuration and context for a sync operation.
func NewConfig ¶
func NewConfig() *Config
NewConfig creates a new configuration, starting with default values, then potentially overriden from CLI flags. Since this is parsing the CLI, it can only be called only once - and it's a feature, not a bug, intended to discourage simultaneous processing with different configs
func NewDefaultConfig ¶
func NewDefaultConfig() *Config
NewDefaultConfig provides a default configuration
func (*Config) ProcessFiles ¶
func (c *Config) ProcessFiles()
ProcessFiles performs a check on all files, checking what files or S3 objects should be changed. If we re not in the xxxmock mode, changes will be made asynchroneously.
func (*Config) ProcessObjects ¶
func (c *Config) ProcessObjects()
ProcessObjects performs a check on all s3 objects, checking what S3 or files changes are needed. If we are not in the xxxMock mode, changes will be made asynchroneously.
func (*Config) RemoveAllEmptyDirs ¶
func (c *Config) RemoveAllEmptyDirs()
RemoveAllEmptyDirs remove all empty directories from the source file. Mostly useful after a restore, if file folder was not initially empty. Never called implicitely on backup/restore. Special care is taken to ensure nested empty dirs are also removed.
type DstObject ¶
type DstObject struct {
// contains filtered or unexported fields
}
DstObject describes the S3 object in the target bucket.
type Mode ¶
type Mode int
Mode indicates in what direction we are synchronizing, and if modifications are actually made.