cls3

package module
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2022 License: MIT Imports: 10 Imported by: 0

README

cls3

Go Report Card GitHub GitHub

The description in Japanese is available on the following blog page. -> Blog

What is

CLI tool to clear (so delete all objects and versions/delete-markers in) Amazon S3 Buckets(AWS). The bucket itself can also be deleted by the option.

Install

  • Homebrew
    brew tap go-to-k/tap
    brew install go-to-k/tap/cls3
    
  • Binary
  • Git Clone and install(for developers)
    git clone https://github.com/go-to-k/cls3.git
    cd cls3
    make install
    

How to use

cls3 -b <bucketName> [-p <profile>] [-r <region>] [-f|--force]
  • -b, --bucketName: required
    • Bucket name
  • -p, --profile: optional
    • AWS profile name
  • -r, --region: optional(default: ap-northeast-1)
    • AWS Region
  • -f, --force: optional
    • ForceMode (Delete the bucket together)

Documentation

Index

Constants

View Source
const AppName = "cls3"

Variables

View Source
var Logger *zerolog.Logger
View Source
var Revision = ""
View Source
var SleepTimeSecForS3 = 10
View Source
var Version = ""

Functions

func NewLogger

func NewLogger(isDebug bool)

Types

type App

type App struct {
	Cli        *cli.App
	BucketName string
	Profile    string
	Region     string
	ForceMode  bool
}

func NewApp

func NewApp(version string) *App

func (*App) Run

func (app *App) Run(ctx context.Context) error

type S3Wrapper added in v0.0.5

type S3Wrapper struct {
	// contains filtered or unexported fields
}

func NewS3Wrapper added in v0.0.5

func NewS3Wrapper(client client.IS3) *S3Wrapper

func (*S3Wrapper) ClearS3Objects added in v0.0.5

func (s3Wrapper *S3Wrapper) ClearS3Objects(bucketName string, forceMode bool) error

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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