Documentation
¶
Index ¶
- Constants
- Variables
- func LoadAWSConfig(ctx context.Context, region string, profile string) (aws.Config, error)
- type ClientError
- type IS3
- type MockIS3
- func (m *MockIS3) CheckBucketExists(ctx context.Context, bucketName *string) (bool, error)
- func (m *MockIS3) DeleteBucket(ctx context.Context, bucketName *string, region string) error
- func (m *MockIS3) DeleteObjects(ctx context.Context, bucketName *string, objects []types.ObjectIdentifier, ...) ([]types.Error, error)
- func (m *MockIS3) EXPECT() *MockIS3MockRecorder
- func (m *MockIS3) GetBucketLocation(ctx context.Context, bucketName *string) (string, error)
- func (m *MockIS3) ListBuckets(ctx context.Context) ([]types.Bucket, error)
- func (m *MockIS3) ListObjectVersions(ctx context.Context, bucketName *string, region string, oldVersionsOnly bool) ([]types.ObjectIdentifier, error)
- func (m *MockIS3) ListObjectVersionsByPage(ctx context.Context, bucketName *string, region string, oldVersionsOnly bool, ...) ([]types.ObjectIdentifier, *string, *string, error)
- type MockIS3MockRecorder
- func (mr *MockIS3MockRecorder) CheckBucketExists(ctx, bucketName interface{}) *gomock.Call
- func (mr *MockIS3MockRecorder) DeleteBucket(ctx, bucketName, region interface{}) *gomock.Call
- func (mr *MockIS3MockRecorder) DeleteObjects(ctx, bucketName, objects, region interface{}) *gomock.Call
- func (mr *MockIS3MockRecorder) GetBucketLocation(ctx, bucketName interface{}) *gomock.Call
- func (mr *MockIS3MockRecorder) ListBuckets(ctx interface{}) *gomock.Call
- func (mr *MockIS3MockRecorder) ListObjectVersions(ctx, bucketName, region, oldVersionsOnly interface{}) *gomock.Call
- func (mr *MockIS3MockRecorder) ListObjectVersionsByPage(...) *gomock.Call
- type Retryer
- func (r *Retryer) GetAttemptToken(context.Context) (func(error) error, error)
- func (r *Retryer) GetInitialToken() func(error) error
- func (r *Retryer) GetRetryToken(context.Context, error) (func(error) error, error)
- func (r *Retryer) IsErrorRetryable(err error) bool
- func (r *Retryer) MaxAttempts() int
- func (r *Retryer) RetryDelay(int, error) (time.Duration, error)
- type S3
- func (s *S3) CheckBucketExists(ctx context.Context, bucketName *string) (bool, error)
- func (s *S3) DeleteBucket(ctx context.Context, bucketName *string, region string) error
- func (s *S3) DeleteObjects(ctx context.Context, bucketName *string, objects []types.ObjectIdentifier, ...) ([]types.Error, error)
- func (s *S3) GetBucketLocation(ctx context.Context, bucketName *string) (string, error)
- func (s *S3) ListBuckets(ctx context.Context) ([]types.Bucket, error)
- func (s *S3) ListObjectVersions(ctx context.Context, bucketName *string, region string, oldVersionsOnly bool) ([]types.ObjectIdentifier, error)
- func (s *S3) ListObjectVersionsByPage(ctx context.Context, bucketName *string, region string, oldVersionsOnly bool, ...) (objectIdentifiers []types.ObjectIdentifier, nextKeyMarker *string, ...)
Constants ¶
const DefaultAwsRegion = "ap-northeast-1"
const MaxRetryCount = 10
Variables ¶
var SleepTimeSecForS3 = 10
Functions ¶
Types ¶
type ClientError ¶
ClientError provides the error with a resource name
func (*ClientError) Error ¶
func (e *ClientError) Error() string
func (*ClientError) Unwrap ¶
func (e *ClientError) Unwrap() error
type IS3 ¶
type IS3 interface { DeleteBucket(ctx context.Context, bucketName *string, region string) error DeleteObjects( ctx context.Context, bucketName *string, objects []types.ObjectIdentifier, region string, ) ([]types.Error, error) ListObjectVersions(ctx context.Context, bucketName *string, region string, oldVersionsOnly bool, ) ([]types.ObjectIdentifier, error) ListObjectVersionsByPage( ctx context.Context, bucketName *string, region string, oldVersionsOnly bool, keyMarker *string, versionIdMarker *string, ) ( objectIdentifiers []types.ObjectIdentifier, nextKeyMarker *string, nextVersionIdMarker *string, err error, ) CheckBucketExists(ctx context.Context, bucketName *string) (bool, error) ListBuckets(ctx context.Context) ([]types.Bucket, error) GetBucketLocation(ctx context.Context, bucketName *string) (string, error) }
type MockIS3 ¶
type MockIS3 struct {
// contains filtered or unexported fields
}
MockIS3 is a mock of IS3 interface.
func NewMockIS3 ¶
func NewMockIS3(ctrl *gomock.Controller) *MockIS3
NewMockIS3 creates a new mock instance.
func (*MockIS3) CheckBucketExists ¶
CheckBucketExists mocks base method.
func (*MockIS3) DeleteBucket ¶
DeleteBucket mocks base method.
func (*MockIS3) DeleteObjects ¶
func (m *MockIS3) DeleteObjects(ctx context.Context, bucketName *string, objects []types.ObjectIdentifier, region string) ([]types.Error, error)
DeleteObjects mocks base method.
func (*MockIS3) EXPECT ¶
func (m *MockIS3) EXPECT() *MockIS3MockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockIS3) GetBucketLocation ¶ added in v0.7.0
GetBucketLocation mocks base method.
func (*MockIS3) ListBuckets ¶
ListBuckets mocks base method.
func (*MockIS3) ListObjectVersions ¶
func (m *MockIS3) ListObjectVersions(ctx context.Context, bucketName *string, region string, oldVersionsOnly bool) ([]types.ObjectIdentifier, error)
ListObjectVersions mocks base method.
func (*MockIS3) ListObjectVersionsByPage ¶ added in v0.16.0
func (m *MockIS3) ListObjectVersionsByPage(ctx context.Context, bucketName *string, region string, oldVersionsOnly bool, keyMarker, versionIdMarker *string) ([]types.ObjectIdentifier, *string, *string, error)
ListObjectVersionsByPage mocks base method.
type MockIS3MockRecorder ¶
type MockIS3MockRecorder struct {
// contains filtered or unexported fields
}
MockIS3MockRecorder is the mock recorder for MockIS3.
func (*MockIS3MockRecorder) CheckBucketExists ¶
func (mr *MockIS3MockRecorder) CheckBucketExists(ctx, bucketName interface{}) *gomock.Call
CheckBucketExists indicates an expected call of CheckBucketExists.
func (*MockIS3MockRecorder) DeleteBucket ¶
func (mr *MockIS3MockRecorder) DeleteBucket(ctx, bucketName, region interface{}) *gomock.Call
DeleteBucket indicates an expected call of DeleteBucket.
func (*MockIS3MockRecorder) DeleteObjects ¶
func (mr *MockIS3MockRecorder) DeleteObjects(ctx, bucketName, objects, region interface{}) *gomock.Call
DeleteObjects indicates an expected call of DeleteObjects.
func (*MockIS3MockRecorder) GetBucketLocation ¶ added in v0.7.0
func (mr *MockIS3MockRecorder) GetBucketLocation(ctx, bucketName interface{}) *gomock.Call
GetBucketLocation indicates an expected call of GetBucketLocation.
func (*MockIS3MockRecorder) ListBuckets ¶
func (mr *MockIS3MockRecorder) ListBuckets(ctx interface{}) *gomock.Call
ListBuckets indicates an expected call of ListBuckets.
func (*MockIS3MockRecorder) ListObjectVersions ¶
func (mr *MockIS3MockRecorder) ListObjectVersions(ctx, bucketName, region, oldVersionsOnly interface{}) *gomock.Call
ListObjectVersions indicates an expected call of ListObjectVersions.
func (*MockIS3MockRecorder) ListObjectVersionsByPage ¶ added in v0.16.0
func (mr *MockIS3MockRecorder) ListObjectVersionsByPage(ctx, bucketName, region, oldVersionsOnly, keyMarker, versionIdMarker interface{}) *gomock.Call
ListObjectVersionsByPage indicates an expected call of ListObjectVersionsByPage.
type Retryer ¶
type Retryer struct {
// contains filtered or unexported fields
}
func (*Retryer) GetAttemptToken ¶
func (*Retryer) GetInitialToken ¶
func (*Retryer) GetRetryToken ¶
func (*Retryer) IsErrorRetryable ¶
func (*Retryer) MaxAttempts ¶
type S3 ¶
type S3 struct {
// contains filtered or unexported fields
}