Documentation ¶
Index ¶
- func CreateBucketInput(spec *v1alpha1.S3BucketSpec) *s3.CreateBucketInput
- func GenerateBucketUsername(spec *v1alpha1.S3BucketSpec) string
- type Bucket
- type Client
- func (c *Client) CreateOrUpdateBucket(spec *v1alpha1.S3BucketSpec) error
- func (c *Client) CreateUser(username string, spec *v1alpha1.S3BucketSpec) (*iam.AccessKey, string, error)
- func (c *Client) DeleteBucket(bucket *v1alpha1.S3Bucket) error
- func (c *Client) GetBucketInfo(username string, spec *v1alpha1.S3BucketSpec) (*Bucket, error)
- func (c *Client) UpdateBucketACL(spec *v1alpha1.S3BucketSpec) error
- func (c *Client) UpdatePolicyDocument(username string, spec *v1alpha1.S3BucketSpec) (string, error)
- func (c *Client) UpdateVersioning(spec *v1alpha1.S3BucketSpec) error
- type Service
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateBucketInput ¶
func CreateBucketInput(spec *v1alpha1.S3BucketSpec) *s3.CreateBucketInput
CreateBucketInput returns a CreateBucketInput from the supplied S3BucketSpec.
func GenerateBucketUsername ¶
func GenerateBucketUsername(spec *v1alpha1.S3BucketSpec) string
GenerateBucketUsername - Genereates a username that is within AWS size specifications, and adds a random suffix
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client implements S3 Client
func (*Client) CreateOrUpdateBucket ¶
func (c *Client) CreateOrUpdateBucket(spec *v1alpha1.S3BucketSpec) error
CreateOrUpdateBucket creates or updates the supplied S3 bucket with provided specification, and returns access keys with permissions of localPermission
func (*Client) CreateUser ¶
func (c *Client) CreateUser(username string, spec *v1alpha1.S3BucketSpec) (*iam.AccessKey, string, error)
CreateUser - Create as user to access bucket per permissions in BucketSpec returing access key and policy version
func (*Client) DeleteBucket ¶
DeleteBucket deletes s3 bucket, and related IAM
func (*Client) GetBucketInfo ¶
GetBucketInfo returns the status of key bucket settings including user's policy version for permission status
func (*Client) UpdateBucketACL ¶
func (c *Client) UpdateBucketACL(spec *v1alpha1.S3BucketSpec) error
UpdateBucketACL - Updated CannedACL on Bucket
func (*Client) UpdatePolicyDocument ¶
UpdatePolicyDocument based on localPermissions
func (*Client) UpdateVersioning ¶
func (c *Client) UpdateVersioning(spec *v1alpha1.S3BucketSpec) error
UpdateVersioning configuration for Bucket
type Service ¶
type Service interface { CreateOrUpdateBucket(spec *v1alpha1.S3BucketSpec) error GetBucketInfo(username string, spec *v1alpha1.S3BucketSpec) (*Bucket, error) CreateUser(username string, spec *v1alpha1.S3BucketSpec) (*iam.AccessKey, string, error) UpdateBucketACL(spec *v1alpha1.S3BucketSpec) error UpdateVersioning(spec *v1alpha1.S3BucketSpec) error UpdatePolicyDocument(username string, spec *v1alpha1.S3BucketSpec) (string, error) DeleteBucket(bucket *v1alpha1.S3Bucket) error }
Service defines S3 Client operations