Documentation ¶
Index ¶
- Variables
- func Bucket(m ...BucketModifier) *v1beta1.Bucket
- func Client(m ...ClientModifier) *fake.MockBucketClient
- type BucketModifier
- func WithAccelerationConfig(s *v1beta1.AccelerateConfiguration) BucketModifier
- func WithArn(arn string) BucketModifier
- func WithCORSConfig(s *v1beta1.CORSConfiguration) BucketModifier
- func WithConditions(c ...xpv1.Condition) BucketModifier
- func WithLifecycleConfig(s *v1beta1.BucketLifecycleConfiguration) BucketModifier
- func WithLoggingConfig(s *v1beta1.LoggingConfiguration) BucketModifier
- func WithNotificationConfig(s *v1beta1.NotificationConfiguration) BucketModifier
- func WithPayerConfig(s *v1beta1.PaymentConfiguration) BucketModifier
- func WithPolicy(s *common.BucketPolicyBody) BucketModifier
- func WithPolicyUpdatePolicy(s *v1beta1.BucketPolicyUpdatePolicy) BucketModifier
- func WithReplConfig(s *v1beta1.ReplicationConfiguration) BucketModifier
- func WithSSEConfig(s *v1beta1.ServerSideEncryptionConfiguration) BucketModifier
- func WithTaggingConfig(s *v1beta1.Tagging) BucketModifier
- func WithVersioningConfig(s *v1beta1.VersioningConfiguration) BucketModifier
- func WithWebConfig(s *v1beta1.WebsiteConfiguration) BucketModifier
- type ClientModifier
- func WithCreateBucket(...) ClientModifier
- func WithDeleteOwnershipControls(...) ClientModifier
- func WithDeleteSSE(...) ClientModifier
- func WithGetRequestPayment(...) ClientModifier
- func WithGetSSE(...) ClientModifier
- func WithPutACL(...) ClientModifier
- func WithPutOwnershipControls(...) ClientModifier
- func WithPutRequestPayment(...) ClientModifier
Constants ¶
This section is empty.
Variables ¶
var ( // Region is the test region of the bucket Region = "us-east-1" // BucketName is the name of the s3 bucket in testing BucketName = "test.bucket.name" )
Functions ¶
func Bucket ¶
func Bucket(m ...BucketModifier) *v1beta1.Bucket
Bucket creates a v1beta1 Bucket for use in testing
func Client ¶
func Client(m ...ClientModifier) *fake.MockBucketClient
Client creates a MockBucketClient with default request functions and an optional list of ClientModifiers
Types ¶
type BucketModifier ¶
BucketModifier is a function which modifies the Bucket for testing
func WithAccelerationConfig ¶
func WithAccelerationConfig(s *v1beta1.AccelerateConfiguration) BucketModifier
WithAccelerationConfig sets the AccelerateConfiguration for an S3 Bucket
func WithCORSConfig ¶
func WithCORSConfig(s *v1beta1.CORSConfiguration) BucketModifier
WithCORSConfig sets the CORSConfiguration for an S3 Bucket
func WithConditions ¶
func WithConditions(c ...xpv1.Condition) BucketModifier
WithConditions sets the Conditions for an S3 Bucket
func WithLifecycleConfig ¶
func WithLifecycleConfig(s *v1beta1.BucketLifecycleConfiguration) BucketModifier
WithLifecycleConfig sets the BucketLifecycleConfiguration for an S3 Bucket
func WithLoggingConfig ¶
func WithLoggingConfig(s *v1beta1.LoggingConfiguration) BucketModifier
WithLoggingConfig sets the LoggingConfiguration for an S3 Bucket
func WithNotificationConfig ¶
func WithNotificationConfig(s *v1beta1.NotificationConfiguration) BucketModifier
WithNotificationConfig sets the NotificationConfiguration for an S3 Bucket
func WithPayerConfig ¶
func WithPayerConfig(s *v1beta1.PaymentConfiguration) BucketModifier
WithPayerConfig sets the PaymentConfiguration for an S3 Bucket
func WithPolicy ¶ added in v0.38.0
func WithPolicy(s *common.BucketPolicyBody) BucketModifier
WithPolicy sets the policy for an S3 Bucket
func WithPolicyUpdatePolicy ¶ added in v0.38.0
func WithPolicyUpdatePolicy(s *v1beta1.BucketPolicyUpdatePolicy) BucketModifier
WithPolicyUpdatePolicy sets BucketPolicyUpdatePolicy for an S3 Bucket.
func WithReplConfig ¶
func WithReplConfig(s *v1beta1.ReplicationConfiguration) BucketModifier
WithReplConfig sets the ReplicationConfiguration for an S3 Bucket
func WithSSEConfig ¶
func WithSSEConfig(s *v1beta1.ServerSideEncryptionConfiguration) BucketModifier
WithSSEConfig sets the ServerSideEncryptionConfiguration for an S3 Bucket
func WithTaggingConfig ¶
func WithTaggingConfig(s *v1beta1.Tagging) BucketModifier
WithTaggingConfig sets the Tagging for an S3 Bucket
func WithVersioningConfig ¶
func WithVersioningConfig(s *v1beta1.VersioningConfiguration) BucketModifier
WithVersioningConfig sets the VersioningConfiguration for an S3 Bucket
func WithWebConfig ¶
func WithWebConfig(s *v1beta1.WebsiteConfiguration) BucketModifier
WithWebConfig sets the WebsiteConfiguration for an S3 Bucket
type ClientModifier ¶
type ClientModifier func(client *fake.MockBucketClient)
ClientModifier is a function which modifies the S3 Client for testing
func WithCreateBucket ¶
func WithCreateBucket(input func(ctx context.Context, input *awss3.CreateBucketInput, opts []func(*awss3.Options)) (*awss3.CreateBucketOutput, error)) ClientModifier
WithCreateBucket sets the MockCreateBucketRequest of the mock S3 Client
func WithDeleteOwnershipControls ¶ added in v0.29.0
func WithDeleteOwnershipControls(input func(ctx context.Context, input *awss3.DeleteBucketOwnershipControlsInput, opts []func(*awss3.Options)) (*awss3.DeleteBucketOwnershipControlsOutput, error)) ClientModifier
WithDeleteOwnershipControls sets the MockDeleteBucketOwnershipControlsRequest of the mock S3 Client
func WithDeleteSSE ¶
func WithDeleteSSE(input func(ctx context.Context, input *awss3.DeleteBucketEncryptionInput, opts []func(*awss3.Options)) (*awss3.DeleteBucketEncryptionOutput, error)) ClientModifier
WithDeleteSSE sets the MockDeleteBucketEncryptionRequest of the mock S3 Client
func WithGetRequestPayment ¶
func WithGetRequestPayment(input func(ctx context.Context, input *awss3.GetBucketRequestPaymentInput, opts []func(*awss3.Options)) (*awss3.GetBucketRequestPaymentOutput, error)) ClientModifier
WithGetRequestPayment sets the MockGetBucketRequestPaymentRequest of the mock S3 Client
func WithGetSSE ¶
func WithGetSSE(input func(ctx context.Context, input *awss3.GetBucketEncryptionInput, opts []func(*awss3.Options)) (*awss3.GetBucketEncryptionOutput, error)) ClientModifier
WithGetSSE sets the MockGetBucketEncryptionRequest of the mock S3 Client
func WithPutACL ¶
func WithPutACL(input func(ctx context.Context, input *awss3.PutBucketAclInput, opts []func(*awss3.Options)) (*awss3.PutBucketAclOutput, error)) ClientModifier
WithPutACL sets the MockPutBucketAclRequest of the mock S3 Client
func WithPutOwnershipControls ¶ added in v0.29.0
func WithPutOwnershipControls(input func(ctx context.Context, input *awss3.PutBucketOwnershipControlsInput, opts []func(*awss3.Options)) (*awss3.PutBucketOwnershipControlsOutput, error)) ClientModifier
WithPutOwnershipControls sets the MockPutBucketOwnershipControlsRequest of the mock S3 Client
func WithPutRequestPayment ¶
func WithPutRequestPayment(input func(ctx context.Context, input *awss3.PutBucketRequestPaymentInput, opts []func(*awss3.Options)) (*awss3.PutBucketRequestPaymentOutput, error)) ClientModifier
WithPutRequestPayment sets the MockPutBucketRequestPaymentRequest of the mock S3 Client