Documentation ¶
Index ¶
Constants ¶
View Source
const MetadataKeyHash = "S3zip-Hash"
Variables ¶
This section is empty.
Functions ¶
func Hash ¶
Hash returns a hash of the given file or directory. This only uses the file size and name for performance.
func LocalObjects ¶
LocalObjects returns a list of relative paths to all files and directories. maxDepth is the maximum depth of recursion, 0 means no recursion.
func Zip ¶
func Zip(name string) io.ReadCloser
Zip returns an uncompressed zip file of the given directory or file.
Types ¶
type Config ¶
type Config struct { DryRun bool `yaml:"dry_run"` S3 ConfigS3 `yaml:"s3"` Targets []ConfigTarget `yaml:"targets"` }
func ReadConfig ¶
type ConfigTarget ¶
type S3Service ¶
type S3Service interface { HeadObjectWithContext(ctx context.Context, input *s3.HeadObjectInput, options ...request.Option) (*s3.HeadObjectOutput, error) ListObjectsV2PagesWithContext(ctx context.Context, input *s3.ListObjectsV2Input, fn func(*s3.ListObjectsV2Output, bool) bool, options ...request.Option) error DeleteObjectsWithContext(ctx context.Context, input *s3.DeleteObjectsInput, options ...request.Option) (*s3.DeleteObjectsOutput, error) }
type S3Uploader ¶
type S3Uploader interface {
UploadWithContext(ctx context.Context, input *s3manager.UploadInput, options ...func(*s3manager.Uploader)) (*s3manager.UploadOutput, error)
}
Click to show internal directories.
Click to hide internal directories.