Documentation ¶
Index ¶
- func CreateAwsService(opts *options.RootOptions) (svc *s3.S3, err error)
- func DeleteAllBucketTags(svc s3iface.S3API, opts *options3.TagOptions) (res *s3.DeleteBucketTaggingOutput, err error)
- func DeleteBucketPolicy(svc s3iface.S3API, opts *options5.BucketPolicyOptions) (res *s3.DeleteBucketPolicyOutput, err error)
- func DeleteFiles(svc s3iface.S3API, bucketName string, slice []*s3.Object, dryRun bool, ...) error
- func GetAllFiles(svc s3iface.S3API, opts *options.RootOptions, prefix string) (res *s3.ListObjectsOutput, err error)
- func GetBucketPolicy(svc s3iface.S3API, opts *options5.BucketPolicyOptions) (res *s3.GetBucketPolicyOutput, err error)
- func GetBucketPolicyString(svc s3iface.S3API, opts *options5.BucketPolicyOptions) (out string, err error)
- func GetBucketTags(svc s3iface.S3API, opts *options3.TagOptions) (res *s3.GetBucketTaggingOutput, err error)
- func GetBucketVersioning(svc s3iface.S3API, opts *options.RootOptions) (res *s3.GetBucketVersioningOutput, err error)
- func GetDesiredFiles(svc s3iface.S3API, opts *options2.SearchOptions) (matchedFiles []string, err error)
- func GetTransferAcceleration(svc s3iface.S3API, opts *options6.TransferAccelerationOptions) (res *s3.GetBucketAccelerateConfigurationOutput, err error)
- func SearchString(svc s3iface.S3API, opts *options2.SearchOptions) (matchedFiles []string, errs []error)
- func SetBucketPolicy(svc s3iface.S3API, opts *options5.BucketPolicyOptions) (res *s3.PutBucketPolicyOutput, err error)
- func SetBucketTags(svc s3iface.S3API, opts *options3.TagOptions) (res *s3.PutBucketTaggingOutput, err error)
- func SetBucketVersioning(svc s3iface.S3API, versioningOpts *options4.VersioningOptions, ...) (err error)
- func SetTransferAcceleration(svc s3iface.S3API, opts *options6.TransferAccelerationOptions, ...) error
- type MockS3Client
- func (m *MockS3Client) DeleteBucketPolicy(input *s3.DeleteBucketPolicyInput) (*s3.DeleteBucketPolicyOutput, error)
- func (m *MockS3Client) DeleteBucketTagging(input *s3.DeleteBucketTaggingInput) (*s3.DeleteBucketTaggingOutput, error)
- func (m *MockS3Client) DeleteObject(input *s3.DeleteObjectInput) (*s3.DeleteObjectOutput, error)
- func (m *MockS3Client) GetBucketAccelerateConfiguration(input *s3.GetBucketAccelerateConfigurationInput) (*s3.GetBucketAccelerateConfigurationOutput, error)
- func (m *MockS3Client) GetBucketPolicy(input *s3.GetBucketPolicyInput) (*s3.GetBucketPolicyOutput, error)
- func (m *MockS3Client) GetBucketTagging(input *s3.GetBucketTaggingInput) (*s3.GetBucketTaggingOutput, error)
- func (m *MockS3Client) GetBucketVersioning(input *s3.GetBucketVersioningInput) (*s3.GetBucketVersioningOutput, error)
- func (m *MockS3Client) GetObject(input *s3.GetObjectInput) (*s3.GetObjectOutput, error)
- func (m *MockS3Client) ListObjects(input *s3.ListObjectsInput) (*s3.ListObjectsOutput, error)
- func (m *MockS3Client) PutBucketAccelerateConfiguration(input *s3.PutBucketAccelerateConfigurationInput) (*s3.PutBucketAccelerateConfigurationOutput, error)
- func (m *MockS3Client) PutBucketPolicy(input *s3.PutBucketPolicyInput) (*s3.PutBucketPolicyOutput, error)
- func (m *MockS3Client) PutBucketTagging(input *s3.PutBucketTaggingInput) (*s3.PutBucketTaggingOutput, error)
- func (m *MockS3Client) PutBucketVersioning(input *s3.PutBucketVersioningInput) (*s3.PutBucketVersioningOutput, error)
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 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 GetTransferAcceleration ¶ added in v0.0.11
func GetTransferAcceleration(svc s3iface.S3API, opts *options6.TransferAccelerationOptions) (res *s3.GetBucketAccelerateConfigurationOutput, err error)
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
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
func (m *MockS3Client) GetBucketAccelerateConfiguration(input *s3.GetBucketAccelerateConfigurationInput) (*s3.GetBucketAccelerateConfigurationOutput, error)
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
func (m *MockS3Client) PutBucketAccelerateConfiguration(input *s3.PutBucketAccelerateConfigurationInput) (*s3.PutBucketAccelerateConfigurationOutput, error)
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