s3compare

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2022 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DiffObject

type DiffObject struct {
	URL          string `json:"Url"`
	LastModified string `json:"LastModified,omitempty"`
}

type DiffObjectPosition

type DiffObjectPosition int
const (
	FirstObject DiffObjectPosition = iota
	SecondObject
)

type DiffReport

type DiffReport struct {
	Type          DiffType            `json:"Type"`
	Objects       []DiffObject        `json:"DiffObjects"`
	CommonHeaders map[string]string   `json:"CommonHeaders,omitempty"`
	DiffHeaders   map[string][]string `json:"DiffHeaders,omitempty"`
}

func MissingDiffReport

func MissingDiffReport(url string, position DiffObjectPosition) *DiffReport

type DiffType

type DiffType string
const DiffTypeMismatch DiffType = DiffType("Mismatch")
const DiffTypeMissing DiffType = DiffType("Missing")

type OutputFormat

type OutputFormat int
const (
	OutputFormatText OutputFormat = iota
	OutputFormatJSON
)

type S3APIClient

type S3APIClient interface {
	s3.HeadObjectAPIClient
	s3.ListObjectsV2APIClient
}

type S3Comparer

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

func NewS3Comparer

func NewS3Comparer(ctx context.Context, output io.Writer, outputFormat OutputFormat,
	s3Client1 S3APIClient, s3Client2 S3APIClient, bucket1, bucket2 string) *S3Comparer

func (*S3Comparer) ComparePrefixes

func (s3c *S3Comparer) ComparePrefixes(prefix1, prefix2 string)

func (*S3Comparer) Concurrency

func (s3c *S3Comparer) Concurrency(concurrency uint)

func (*S3Comparer) IgnoreHeader

func (s3c *S3Comparer) IgnoreHeader(header string)

Jump to

Keyboard shortcuts

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