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 // When set, will invalidate the CDN cache(s) for the updated files. CDNDistributionIDs Strings // When set, will override the default AWS endpoint. EndpointURL string // Optional configFile ConfigFile string NumberOfWorkers int MaxDelete int ACL string PublicReadACL bool Verbose bool Silent bool Force bool Try bool Ignore string IgnoreRE *regexp.Regexp // compiled version of Ignore // CLI state PrintVersion bool // Print help Help bool // contains filtered or unexported fields }
Config configures a deployment.
func ConfigFromArgs ¶ added in v2.9.0
Parse the flags in the flag set from the provided (presumably commandline) args. Additional flags may be provided to parse from a config file and/or environment variables in that priority order. The Config needs to be initialized with Init before it's used.
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.