gompress

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package gompress exposes a function to compress the contents of an S3 bucket

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(conf *Config) error

Run starts gompress with the provided configuration

Types

type Config

type Config struct {
	// Src defines where to take the data from
	Src *S3Locaction

	// Dst defines where to put compressed data
	Dst *S3Locaction

	// KeepOriginal is a flag that allows to keep or remove compressed files in
	// Src location
	KeepOriginal bool

	// Endpoint is used for tests to override default s3 endpoint
	Endpoint string
}

Config defines how gompress will process the files

type S3Locaction

type S3Locaction struct {
	// Region is AWS region
	Region string

	// Bucket is a bucket in s3
	Bucket string

	// Prefix is a path inside the bucket, or part of it
	Prefix string
}

S3Locaction defines a path in s3, including region, bucket and prefix

Jump to

Keyboard shortcuts

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