Documentation ¶
Index ¶
- Variables
- func AssumeRole(ctx context.Context, stsClient backendstore.STSClient, ...) (*sts.AssumeRoleOutput, error)
- func BucketExists(ctx context.Context, s3Backend backendstore.S3Client, bucketName string, ...) (bool, error)
- func BucketToCreateBucketInput(bucket *v1alpha1.Bucket) *s3.CreateBucketInput
- func BucketToGetBucketACLInput(bucket *v1alpha1.Bucket) *s3.GetBucketAclInput
- func BucketToPutBucketACLInput(bucket *v1alpha1.Bucket) *s3.PutBucketAclInput
- func BucketToPutBucketOwnershipControlsInput(bucket *v1alpha1.Bucket) *s3.PutBucketOwnershipControlsInput
- func CreateBucket(ctx context.Context, s3Backend backendstore.S3Client, ...) (*awss3.CreateBucketOutput, error)
- func DeleteBucket(ctx context.Context, s3Backend backendstore.S3Client, bucketName *string, ...) error
- func DeleteBucketLifecycle(ctx context.Context, s3Backend backendstore.S3Client, bucketName *string) error
- func DeleteBucketPolicy(ctx context.Context, s3Backend backendstore.S3Client, bucketName *string) error
- func DeleteObject(ctx context.Context, s3Backend backendstore.S3Client, ...) error
- func GenerateAccessControlPolicy(policyIn *v1alpha1.AccessControlPolicy) *s3types.AccessControlPolicy
- func GenerateGrants(grantsIn []v1alpha1.Grant) []s3types.Grant
- func GenerateLifecycleConfigurationInput(name string, config *v1alpha1.BucketLifecycleConfiguration) *awss3.PutBucketLifecycleConfigurationInput
- func GenerateLifecycleRules(in []v1alpha1.LifecycleRule) []types.LifecycleRule
- func GenerateObjectLockConfiguration(inputConfig *v1alpha1.ObjectLockConfiguration) *types.ObjectLockConfiguration
- func GenerateOwner(ownerIn *v1alpha1.Owner) *s3types.Owner
- func GeneratePutBucketVersioningInput(name string, config *v1alpha1.VersioningConfiguration) *awss3.PutBucketVersioningInput
- func GeneratePutObjectLockConfigurationInput(name string, config *v1alpha1.ObjectLockConfiguration) *awss3.PutObjectLockConfigurationInput
- func GenerateVersioningConfiguration(inputConfig *v1alpha1.VersioningConfiguration) *types.VersioningConfiguration
- func GetBucketAcl(ctx context.Context, s3Backend backendstore.S3Client, ...) (*awss3.GetBucketAclOutput, error)
- func GetBucketLifecycleConfiguration(ctx context.Context, s3Backend backendstore.S3Client, bucketName *string) (*awss3.GetBucketLifecycleConfigurationOutput, error)
- func GetBucketPolicy(ctx context.Context, s3Backend backendstore.S3Client, bucketName *string) (*awss3.GetBucketPolicyOutput, error)
- func GetBucketVersioning(ctx context.Context, s3Backend backendstore.S3Client, bucketName *string) (*awss3.GetBucketVersioningOutput, error)
- func GetObject(ctx context.Context, s3Backend backendstore.S3Client, ...) (*awss3.GetObjectOutput, error)
- func GetObjectLockConfiguration(ctx context.Context, s3Backend backendstore.S3Client, bucketName *string) (*awss3.GetObjectLockConfigurationOutput, error)
- func IsAlreadyExists(err error) bool
- func IsAlreadyOwnedByYou(err error) bool
- func IsBucketNotFound(err error) bool
- func IsNotEmpty(err error) bool
- func IsNotFound(err error) bool
- func LifecycleConfigurationNotFound(err error) bool
- func ListObjectVersions(ctx context.Context, s3Backend backendstore.S3Client, ...) (*awss3.ListObjectVersionsOutput, error)
- func ListObjectsV2(ctx context.Context, s3Backend backendstore.S3Client, ...) (*awss3.ListObjectsV2Output, error)
- func NewS3Client(ctx context.Context, data map[string][]byte, ...) (*s3.Client, error)
- func NewSTSClient(ctx context.Context, data map[string][]byte, ...) (*sts.Client, error)
- func NoSuchBucket(err error) bool
- func ObjectLockConfigurationNotFound(err error) bool
- func PutBucketAcl(ctx context.Context, s3Backend backendstore.S3Client, ...) (*awss3.PutBucketAclOutput, error)
- func PutBucketLifecycleConfiguration(ctx context.Context, s3Backend backendstore.S3Client, b *v1alpha1.Bucket) (*awss3.PutBucketLifecycleConfigurationOutput, error)
- func PutBucketPolicy(ctx context.Context, s3Backend backendstore.S3Client, b *v1alpha1.Bucket) (*awss3.PutBucketPolicyOutput, error)
- func PutBucketVersioning(ctx context.Context, s3Backend backendstore.S3Client, b *v1alpha1.Bucket) (*awss3.PutBucketVersioningOutput, error)
- func PutObject(ctx context.Context, s3Backend backendstore.S3Client, ...) error
- func PutObjectLockConfiguration(ctx context.Context, s3Backend backendstore.S3Client, b *v1alpha1.Bucket) (*awss3.PutObjectLockConfigurationOutput, error)
- func SortFilterTags(rules []types.LifecycleRule)
- type BucketNotEmptyError
Constants ¶
This section is empty.
Variables ¶
var ( // Define this error as an error type because bucket controller checks it ErrBucketNotEmpty = errors.New("bucket is not empty") )
var LifecycleNotFoundErrCode = "NoSuchLifecycleConfiguration"
LifecycleNotFoundErrCode is the error code sent by Ceph when the lifecycle config does not exist
var NoSuchBucketErrCode = "NoSuchBucket"
NoSuchBucketErrCode is the error code sent by Ceph when the bucket does not exist
var ObjectLockConfigurationNotFoundErrCode = "ObjectLockConfigurationNotFoundError"
ObjectLockConfigurationNotfoundErrCode is the error code sent by Ceph when the object lock config does not exist
Functions ¶
func AssumeRole ¶
func AssumeRole(ctx context.Context, stsClient backendstore.STSClient, input *sts.AssumeRoleInput) (*sts.AssumeRoleOutput, error)
func BucketExists ¶
func BucketToCreateBucketInput ¶
func BucketToCreateBucketInput(bucket *v1alpha1.Bucket) *s3.CreateBucketInput
func BucketToGetBucketACLInput ¶ added in v0.0.44
func BucketToGetBucketACLInput(bucket *v1alpha1.Bucket) *s3.GetBucketAclInput
func BucketToPutBucketACLInput ¶
func BucketToPutBucketACLInput(bucket *v1alpha1.Bucket) *s3.PutBucketAclInput
func BucketToPutBucketOwnershipControlsInput ¶
func BucketToPutBucketOwnershipControlsInput(bucket *v1alpha1.Bucket) *s3.PutBucketOwnershipControlsInput
func CreateBucket ¶
func CreateBucket(ctx context.Context, s3Backend backendstore.S3Client, bucket *awss3.CreateBucketInput, o ...func(*awss3.Options)) (*awss3.CreateBucketOutput, error)
func DeleteBucket ¶
func DeleteBucketLifecycle ¶
func DeleteBucketPolicy ¶ added in v0.0.45
func DeleteObject ¶
func DeleteObject(ctx context.Context, s3Backend backendstore.S3Client, input *awss3.DeleteObjectInput, o ...func(*awss3.Options)) error
func GenerateAccessControlPolicy ¶ added in v0.0.44
func GenerateAccessControlPolicy(policyIn *v1alpha1.AccessControlPolicy) *s3types.AccessControlPolicy
func GenerateGrants ¶ added in v0.0.44
func GenerateLifecycleConfigurationInput ¶
func GenerateLifecycleConfigurationInput(name string, config *v1alpha1.BucketLifecycleConfiguration) *awss3.PutBucketLifecycleConfigurationInput
GenerateLifecycleConfiguration creates the PutBucketLifecycleConfigurationInput for the AWS SDK
func GenerateLifecycleRules ¶
func GenerateLifecycleRules(in []v1alpha1.LifecycleRule) []types.LifecycleRule
GenerateLifecycleRules creates the list of LifecycleRules for the AWS SDK
func GenerateObjectLockConfiguration ¶ added in v0.0.48
func GenerateObjectLockConfiguration(inputConfig *v1alpha1.ObjectLockConfiguration) *types.ObjectLockConfiguration
func GeneratePutBucketVersioningInput ¶ added in v0.0.47
func GeneratePutBucketVersioningInput(name string, config *v1alpha1.VersioningConfiguration) *awss3.PutBucketVersioningInput
GeneratePutBucketVersioningInput creates the PutBucketVersioningInput for the AWS SDK
func GeneratePutObjectLockConfigurationInput ¶ added in v0.0.48
func GeneratePutObjectLockConfigurationInput(name string, config *v1alpha1.ObjectLockConfiguration) *awss3.PutObjectLockConfigurationInput
GeneratePutObjectLockConfigurationInput creates the PutObjectLockConfiguration for the AWS SDK
func GenerateVersioningConfiguration ¶ added in v0.0.47
func GenerateVersioningConfiguration(inputConfig *v1alpha1.VersioningConfiguration) *types.VersioningConfiguration
func GetBucketAcl ¶ added in v0.0.44
func GetBucketAcl(ctx context.Context, s3Backend backendstore.S3Client, in *awss3.GetBucketAclInput, o ...func(*awss3.Options)) (*awss3.GetBucketAclOutput, error)
func GetBucketLifecycleConfiguration ¶
func GetBucketLifecycleConfiguration(ctx context.Context, s3Backend backendstore.S3Client, bucketName *string) (*awss3.GetBucketLifecycleConfigurationOutput, error)
func GetBucketPolicy ¶ added in v0.0.45
func GetBucketPolicy(ctx context.Context, s3Backend backendstore.S3Client, bucketName *string) (*awss3.GetBucketPolicyOutput, error)
func GetBucketVersioning ¶ added in v0.0.47
func GetBucketVersioning(ctx context.Context, s3Backend backendstore.S3Client, bucketName *string) (*awss3.GetBucketVersioningOutput, error)
func GetObject ¶
func GetObject(ctx context.Context, s3Backend backendstore.S3Client, input *awss3.GetObjectInput, o ...func(*awss3.Options)) (*awss3.GetObjectOutput, error)
func GetObjectLockConfiguration ¶ added in v0.0.48
func GetObjectLockConfiguration(ctx context.Context, s3Backend backendstore.S3Client, bucketName *string) (*awss3.GetObjectLockConfigurationOutput, error)
func IsAlreadyExists ¶
IsAlreadyExists helper function to test for ErrCodeBucketAlreadyExists error
func IsAlreadyOwnedByYou ¶
IsAlreadyOwnedByYou helper function to test for ErrCodeBucketAlreadyOwnedByYou error
func IsBucketNotFound ¶
BucketNotFound parses the error and validates if the bucket does not exist
func IsNotEmpty ¶ added in v0.0.41
func IsNotFound ¶
IsNotFound helper function to test for NotFound error
func LifecycleConfigurationNotFound ¶
LifecycleConfigurationNotFound is parses the error and validates if the lifecycle configuration does not exist
func ListObjectVersions ¶
func ListObjectVersions(ctx context.Context, s3Backend backendstore.S3Client, input *awss3.ListObjectVersionsInput, o ...func(*awss3.Options)) (*awss3.ListObjectVersionsOutput, error)
func ListObjectsV2 ¶
func ListObjectsV2(ctx context.Context, s3Backend backendstore.S3Client, input *awss3.ListObjectsV2Input, o ...func(*awss3.Options)) (*awss3.ListObjectsV2Output, error)
func NewS3Client ¶
func NewSTSClient ¶
func NoSuchBucket ¶
NoSuchBucket helper function to test for NoSuchBucket error
func ObjectLockConfigurationNotFound ¶ added in v0.0.48
ObjectLockConfigurationNotFound is parses the error and validates if the object lock configuration does not exist
func PutBucketAcl ¶ added in v0.0.44
func PutBucketAcl(ctx context.Context, s3Backend backendstore.S3Client, in *awss3.PutBucketAclInput, o ...func(*awss3.Options)) (*awss3.PutBucketAclOutput, error)
func PutBucketLifecycleConfiguration ¶
func PutBucketLifecycleConfiguration(ctx context.Context, s3Backend backendstore.S3Client, b *v1alpha1.Bucket) (*awss3.PutBucketLifecycleConfigurationOutput, error)
func PutBucketPolicy ¶ added in v0.0.45
func PutBucketPolicy(ctx context.Context, s3Backend backendstore.S3Client, b *v1alpha1.Bucket) (*awss3.PutBucketPolicyOutput, error)
func PutBucketVersioning ¶ added in v0.0.47
func PutBucketVersioning(ctx context.Context, s3Backend backendstore.S3Client, b *v1alpha1.Bucket) (*awss3.PutBucketVersioningOutput, error)
func PutObject ¶
func PutObject(ctx context.Context, s3Backend backendstore.S3Client, input *awss3.PutObjectInput, o ...func(*awss3.Options)) error
func PutObjectLockConfiguration ¶ added in v0.0.48
func PutObjectLockConfiguration(ctx context.Context, s3Backend backendstore.S3Client, b *v1alpha1.Bucket) (*awss3.PutObjectLockConfigurationOutput, error)
func SortFilterTags ¶
func SortFilterTags(rules []types.LifecycleRule)
Types ¶
type BucketNotEmptyError ¶ added in v0.0.41
type BucketNotEmptyError struct{}
Unlike NoSuchBucket error or others, aws-sdk-go-v2 doesn't have a specific struct definition for BucketNotEmpty error. So we should define ourselves. This is currently only for testing.
func (BucketNotEmptyError) Error ¶ added in v0.0.41
func (e BucketNotEmptyError) Error() string
func (BucketNotEmptyError) ErrorCode ¶ added in v0.0.41
func (e BucketNotEmptyError) ErrorCode() string
func (BucketNotEmptyError) ErrorFault ¶ added in v0.0.41
func (e BucketNotEmptyError) ErrorFault() smithy.ErrorFault
func (BucketNotEmptyError) ErrorMessage ¶ added in v0.0.41
func (e BucketNotEmptyError) ErrorMessage() string