aws

package
v1.0.19 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2023 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateAwsService added in v0.0.3

func CreateAwsService(opts *options.RootOptions) (svc *s3.S3, err error)

func DeleteAllBucketTags added in v0.0.6

func DeleteAllBucketTags(svc s3iface.S3API, opts *options3.TagOptions) (res *s3.DeleteBucketTaggingOutput, err error)

func DeleteBucketPolicy added in v0.0.10

func DeleteBucketPolicy(svc s3iface.S3API, opts *options5.BucketPolicyOptions) (res *s3.DeleteBucketPolicyOutput, err error)

func DeleteFiles

func DeleteFiles(svc s3iface.S3API, bucketName string, slice []*s3.Object, dryRun bool, logger zerolog.Logger) error

DeleteFiles deletes the slice of []*s3.Object objects in the target bucket

func GetAllFiles

func GetAllFiles(svc s3iface.S3API, opts *options.RootOptions, prefix string) (res *s3.ListObjectsOutput, err error)

GetAllFiles gets all of the files in the target bucket as the function name indicates

func GetBucketPolicy added in v0.0.9

func GetBucketPolicy(svc s3iface.S3API, opts *options5.BucketPolicyOptions) (res *s3.GetBucketPolicyOutput, err error)

func GetBucketPolicyString added in v1.0.9

func GetBucketPolicyString(svc s3iface.S3API, opts *options5.BucketPolicyOptions) (out string, err error)

func GetBucketTags added in v0.0.5

func GetBucketTags(svc s3iface.S3API, opts *options3.TagOptions) (res *s3.GetBucketTaggingOutput, err error)

func GetBucketVersioning added in v0.0.3

func GetBucketVersioning(svc s3iface.S3API, opts *options.RootOptions) (res *s3.GetBucketVersioningOutput, err error)

GetBucketVersioning gets the target bucket

func GetDesiredFiles added in v0.0.4

func GetDesiredFiles(svc s3iface.S3API, opts *options2.SearchOptions) (matchedFiles []string, err error)

func GetTransferAcceleration added in v0.0.11

func SearchString added in v0.0.4

func SearchString(svc s3iface.S3API, opts *options2.SearchOptions) (matchedFiles []string, errs []error)

SearchString does the heavy lifting, communicates with the S3 and finds the files

It returns the string array that contains keys of matched files, along with the error array that contains errors during search process for each individual file.

func SetBucketPolicy added in v0.0.10

func SetBucketPolicy(svc s3iface.S3API, opts *options5.BucketPolicyOptions) (res *s3.PutBucketPolicyOutput, err error)

func SetBucketTags added in v0.0.5

func SetBucketTags(svc s3iface.S3API, opts *options3.TagOptions) (res *s3.PutBucketTaggingOutput, err error)

func SetBucketVersioning added in v0.0.3

func SetBucketVersioning(svc s3iface.S3API, versioningOpts *options4.VersioningOptions, confirmRunner prompt.PromptRunner, logger zerolog.Logger) (err error)

SetBucketVersioning sets the target bucket

func SetTransferAcceleration added in v0.0.11

func SetTransferAcceleration(svc s3iface.S3API, opts *options6.TransferAccelerationOptions, confirmRunner prompt.PromptRunner, logger zerolog.Logger) error

Types

type MockS3Client added in v1.0.19

type MockS3Client struct {
	mock.Mock
	s3iface.S3API
}

func (*MockS3Client) DeleteBucketPolicy added in v1.0.19

func (m *MockS3Client) DeleteBucketPolicy(input *s3.DeleteBucketPolicyInput) (*s3.DeleteBucketPolicyOutput, error)

func (*MockS3Client) DeleteBucketTagging added in v1.0.19

func (m *MockS3Client) DeleteBucketTagging(input *s3.DeleteBucketTaggingInput) (*s3.DeleteBucketTaggingOutput, error)

DeleteBucketTagging mocks the DeleteBucketTagging method of s3iface.S3API

func (*MockS3Client) DeleteObject added in v1.0.19

func (m *MockS3Client) DeleteObject(input *s3.DeleteObjectInput) (*s3.DeleteObjectOutput, error)

func (*MockS3Client) GetBucketAccelerateConfiguration added in v1.0.19

GetBucketAccelerateConfiguration mocks the GetBucketAccelerateConfiguration method of s3iface.S3API

func (*MockS3Client) GetBucketPolicy added in v1.0.19

func (m *MockS3Client) GetBucketPolicy(input *s3.GetBucketPolicyInput) (*s3.GetBucketPolicyOutput, error)

GetBucketPolicy mocks the GetBucketPolicy method of s3iface.S3API

func (*MockS3Client) GetBucketTagging added in v1.0.19

func (m *MockS3Client) GetBucketTagging(input *s3.GetBucketTaggingInput) (*s3.GetBucketTaggingOutput, error)

GetBucketTagging mocks the GetBucketTagging method of s3iface.S3API

func (*MockS3Client) GetBucketVersioning added in v1.0.19

func (m *MockS3Client) GetBucketVersioning(input *s3.GetBucketVersioningInput) (*s3.GetBucketVersioningOutput, error)

GetBucketVersioning mocks the GetBucketVersioning method of s3iface.S3API

func (*MockS3Client) GetObject added in v1.0.19

func (m *MockS3Client) GetObject(input *s3.GetObjectInput) (*s3.GetObjectOutput, error)

GetObject mocks the GetObject method of s3iface.S3API

func (*MockS3Client) ListObjects added in v1.0.19

func (m *MockS3Client) ListObjects(input *s3.ListObjectsInput) (*s3.ListObjectsOutput, error)

func (*MockS3Client) PutBucketAccelerateConfiguration added in v1.0.19

PutBucketAccelerateConfiguration mocks the PutBucketAccelerateConfiguration method of s3iface.S3API

func (*MockS3Client) PutBucketPolicy added in v1.0.19

func (m *MockS3Client) PutBucketPolicy(input *s3.PutBucketPolicyInput) (*s3.PutBucketPolicyOutput, error)

func (*MockS3Client) PutBucketTagging added in v1.0.19

func (m *MockS3Client) PutBucketTagging(input *s3.PutBucketTaggingInput) (*s3.PutBucketTaggingOutput, error)

PutBucketTagging mocks the PutBucketTagging method of s3iface.S3API

func (*MockS3Client) PutBucketVersioning added in v1.0.19

func (m *MockS3Client) PutBucketVersioning(input *s3.PutBucketVersioningInput) (*s3.PutBucketVersioningOutput, error)

PutBucketVersioning mocks the PutBucketVersioning method of s3iface.S3API

Jump to

Keyboard shortcuts

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