Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { AccessKey string SecretKey string SourcePath string BucketName string // To have multiple sites in one bucket. BucketPath string RegionName string // Optional configFile ConfigFile string NumberOfWorkers int MaxDelete int Verbose bool Silent bool Force bool Try bool // CLI state PrintVersion bool Help bool // contains filtered or unexported fields }
Config configures a deployment.
func FlagsToConfig ¶
FlagsToConfig reads command-line flags from os.Args[1:] into Config. Note that flag.Parse is not called.
type DeployStats ¶
type DeployStats struct { // Number of files deleted. Deleted uint64 // Number of files on remote not present locally (-max-delete threshold reached) Stale uint64 // Number of files uploaded. Uploaded uint64 // Number of files skipped (i.e. not changed) Skipped uint64 }
DeployStats contains some simple stats about the deployment.
func Deploy ¶
func Deploy(cfg *Config) (DeployStats, error)
Deploy deploys to the remote based on the given config.
func (DeployStats) FileCount ¶
func (d DeployStats) FileCount() uint64
FileCount returns the total number of files both locally and remote.
func (DeployStats) FileCountChanged ¶
func (d DeployStats) FileCountChanged() uint64
FileCountChanged returns the total number of files changed on server.
func (DeployStats) PercentageChanged ¶
func (d DeployStats) PercentageChanged() float32
PercentageChanged returns the percentage of files that have changed.
func (DeployStats) Summary ¶
func (d DeployStats) Summary() string
Summary returns formatted summary of the stats.
Click to show internal directories.
Click to hide internal directories.