bucket-janitor

command module
v0.0.0-...-9154d98 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

README

Bucket Janitor

This is work in progress

Use on S3 buckets to verify the content.
More specifically, to make sure files have certain file extensions and contain data of the appropriate type.

Use case:

When you provide 3rd party access to a bucket, there are certain risks related to the content that is uploaded.
This tool will use the magic library to verify the type of the files and their extensions.

Note:

This is meant to be an excercise in concurrent coding.
Semaphores are being used to limit concurrency, objects are pipelined through a process of listing, downloading, detecting type and aggregating. For now a table is being printed of the detected mime/magic combination and their counts.

|-- LICENSE
|-- README.md
|-- cmd
|   `-- bucket-janitor.go
|-- configs
|   `-- example.json
|-- go.mod
|-- go.sum
`-- internal
    |-- aws
    |   `-- main.go
    `-- janitor
        |-- count.go
        |-- detect.go
        |-- list.go
        |-- main.go
        |-- prepare.go
        `-- retrieve.go
Use:

Copy and edit the example json from the configs folder, then execute as below:

go build cmd/bucket-janitor.go
./bucket-janitor.go -c config.json

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal
aws

Jump to

Keyboard shortcuts

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