forked from giantswarm/aws-operator
/
spec.go
25 lines (21 loc) · 833 Bytes
/
spec.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
package s3bucket
import (
"github.com/aws/aws-sdk-go/service/s3"
)
// BucketState is the state representation on which the resource methods work.
type BucketState struct {
Name string
}
type Clients struct {
S3 S3Client
}
// S3Client describes the methods required to be implemented by a S3 AWS client.
type S3Client interface {
CreateBucket(*s3.CreateBucketInput) (*s3.CreateBucketOutput, error)
DeleteBucket(*s3.DeleteBucketInput) (*s3.DeleteBucketOutput, error)
DeleteObject(*s3.DeleteObjectInput) (*s3.DeleteObjectOutput, error)
DeleteObjects(*s3.DeleteObjectsInput) (*s3.DeleteObjectsOutput, error)
HeadBucket(*s3.HeadBucketInput) (*s3.HeadBucketOutput, error)
ListObjectsV2(*s3.ListObjectsV2Input) (*s3.ListObjectsV2Output, error)
PutBucketTagging(*s3.PutBucketTaggingInput) (*s3.PutBucketTaggingOutput, error)
}