cmd

package module
v0.0.0-...-8b27293 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2021 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MinPartSize                = 5 * 1024 * 1024     // 5 MB
	MaxFileSize                = MinPartSize * 409.6 // 2 GB
	DefaultDownloadConcurrency = 5
	Dummy                      = "/dev/null"
)
View Source
const (
	ISOLayout = "2006-01-02"
)

Variables

View Source
var (
	Debug bool

	RootCmd = &cobra.Command{
		Use:              "sc",
		Short:            "Scality S3 frontend commands",
		Long:             ``,
		TraverseChildren: true,
	}
)

rootCmd represents the base command when called without any subcommands

View Source
var (
	R bool
)

Functions

func CheckBucket

func CheckBucket(svc *s3.S3, bucket string) error

func Execute

func Execute()

Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.

func GetBucketPolicy

func GetBucketPolicy(cmd *cobra.Command, args []string)

func GetBucketRep

func GetBucketRep(cmd *cobra.Command, args []string)

func ListObjNew

func ListObjNew(cmd *cobra.Command, args []string)

func ListObjRepInfo

func ListObjRepInfo(cmd *cobra.Command, args []string)

func UploadMultipart1

func UploadMultipart1(fd *os.File, fileSize int64, svc *s3.S3)

func UploadMultipart2

func UploadMultipart2(fd *os.File, fileSize int64, svc *s3.S3)

func UploadMultipart3

func UploadMultipart3(fd *os.File, fileSize int64, svc *s3.S3)

Types

type Counter

type Counter struct {
	Elapsed time.Duration
	Marker  string
	Date    time.Time
	Total   int64
	New     int64
}

func (Counter) Print

func (c Counter) Print()

type Report

type Report struct {
	Elapsed       time.Duration
	Total         int64
	CompSize      float64
	OthSize       float64
	SkipSize      float64
	ReportMeta    ReportNumber
	ReportBackend ReportNumber
	Skipped       int64
}

func (Report) Print

func (r Report) Print(log *log.Logger, back bool)

type ReportNumber

type ReportNumber struct {
	Pending   int64
	Failed    int64
	Completed int64
	Other     int64
}

type Resp

type Resp struct {
	Cp  *s3.CompletedPart
	Cl  int64
	Err error
}

Jump to

Keyboard shortcuts

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