sync

package
v0.0.0-...-f43c413 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2020 License: MIT Imports: 15 Imported by: 0

Documentation

Overview

Package sync includes functions synchronizing a source and destination

Index

Constants

View Source
const (
	WildcardCharacter = "*"

	MsgLocalFiles = "Synchronizing local directories"
	MsgNewSession = "Creating AWS Session"
	MsgUploadS3   = "Uploading to AWS S3"
	MsgDownloadS3 = "Downloading from AWS S3"
)

Variables

This section is empty.

Functions

func CollectFiles

func CollectFiles(in []string) ([]string, error)

func CopyLocalToLocal

func CopyLocalToLocal(source string, destination string, parents bool) error

func Sync

func Sync(input *SyncInput) error

func SyncLocalToLocal

func SyncLocalToLocal(input *SyncLocalToLocalInput) error

func SyncLocalToS3

func SyncLocalToS3(input *SyncLocalToS3Input) error

func SyncS3ToLocal

func SyncS3ToLocal(input *SyncS3ToLocalInput) error

Types

type SyncInput

type SyncInput struct {
	Source      string
	Destination string
	Parents     bool
	Limit       int
	Verbose     bool
	Credentials *credentials.Credentials
	PoolSize    int
	StopOnError bool
	Timeout     time.Duration
	MaxKeys     int
}

type SyncLocalToLocalInput

type SyncLocalToLocalInput struct {
	Source      string
	Destination string
	Parents     bool
	Verbose     bool
}

type SyncLocalToS3Input

type SyncLocalToS3Input struct {
	Source      string
	Bucket      string
	KeyPrefix   string
	Uploader    *s3manager.Uploader
	PoolSize    int
	StopOnError bool
	Limit       int
	Verbose     bool
	Timeout     time.Duration
}

type SyncS3ToLocalInput

type SyncS3ToLocalInput struct {
	Bucket      string
	KeyPrefix   string
	Destination string
	Client      *s3.S3
	Downloader  *s3manager.Downloader
	Parents     bool
	Limit       int
	PoolSize    int
	StopOnError bool
	Verbose     bool
	Timeout     time.Duration
	MaxKeys     int
}

Jump to

Keyboard shortcuts

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