Documentation
¶
Index ¶
- Variables
- func ArgumentNotSupported(err error) bool
- func CORSConfigurationNotFound(err error) bool
- func CopyTags(tags []v1beta1.Tag) []s3.Tag
- func GenerateBucketObservation(name string) v1beta1.BucketExternalStatus
- func GenerateCreateBucketInput(name string, s v1beta1.BucketParameters) *s3.CreateBucketInput
- func IsAlreadyExists(err error) bool
- func IsErrorBucketNotFound(err error) bool
- func IsErrorPolicyNotFound(err error) bool
- func IsNotFound(err error) bool
- func LifecycleConfigurationNotFound(err error) bool
- func MethodNotSupported(err error) bool
- func ReplicationConfigurationNotFound(err error) bool
- func SSEConfigurationNotFound(err error) bool
- func Serialize(p v1alpha2.BucketPolicyParameters) (interface{}, error)
- func SerializeAWSPrincipal(p v1alpha2.AWSPrincipal) *string
- func SerializeBucketCondition(p map[string]v1alpha2.Condition) (interface{}, error)
- func SerializeBucketPolicyStatement(p v1alpha2.BucketPolicyStatement) (interface{}, error)
- func SerializeBucketPrincipal(p *v1alpha2.BucketPrincipal) (interface{}, error)
- func SortS3TagSet(tags []s3.Tag) []s3.Tag
- func TaggingNotFound(err error) bool
- func UpdateBucketACL(ctx context.Context, client BucketClient, bucket *v1beta1.Bucket) error
- func WebsiteConfigurationNotFound(err error) bool
- type BucketClient
- type BucketPolicyClient
Constants ¶
This section is empty.
Variables ¶
var ( // BucketErrCode is the error code sent by AWS when a bucket does not exist BucketErrCode = "NotFound" // CORSErrCode is the error code sent by AWS when the CORS configuration does not exist CORSErrCode = "NoSuchCORSConfiguration" // ReplicationErrCode is the error code sent by AWS when the replication config does not exist ReplicationErrCode = "ReplicationConfigurationNotFoundError" // LifecycleErrCode is the error code sent by AWS when the lifecycle config does not exist LifecycleErrCode = "NoSuchLifecycleConfiguration" // SSEErrCode is the error code sent by AWS when the SSE config does not exist SSEErrCode = "ServerSideEncryptionConfigurationNotFoundError" // TaggingErrCode is the error code sent by AWS when the tagging does not exist TaggingErrCode = "NoSuchTagSet" // WebsiteErrCode is the error code sent by AWS when the website config does not exist WebsiteErrCode = "NoSuchWebsiteConfiguration" // MethodNotAllowed is the error code sent by AWS when the request method for an object is not allowed MethodNotAllowed = "MethodNotAllowed" // UnsupportedArgument is the error code sent by AWS when the request fields contain an argument that is not supported UnsupportedArgument = "UnsupportedArgument" )
Functions ¶
func ArgumentNotSupported ¶ added in v0.15.0
ArgumentNotSupported is parses the aws Error and validates if parameters are now allowed for a request
func CORSConfigurationNotFound ¶ added in v0.12.0
CORSConfigurationNotFound is parses the aws Error and validates if the cors configuration does not exist
func GenerateBucketObservation ¶ added in v0.12.0
func GenerateBucketObservation(name string) v1beta1.BucketExternalStatus
GenerateBucketObservation generates the ARN string for the external status
func GenerateCreateBucketInput ¶ added in v0.12.0
func GenerateCreateBucketInput(name string, s v1beta1.BucketParameters) *s3.CreateBucketInput
GenerateCreateBucketInput creates the input for CreateBucket S3 Client request
func IsAlreadyExists ¶ added in v0.12.0
IsAlreadyExists helper function to test for ErrCodeBucketAlreadyOwnedByYou error
func IsErrorBucketNotFound ¶ added in v0.12.0
IsErrorBucketNotFound returns true if the error code indicates that the bucket was not found
func IsErrorPolicyNotFound ¶ added in v0.12.0
IsErrorPolicyNotFound returns true if the error code indicates that the item was not found
func IsNotFound ¶ added in v0.12.0
IsNotFound helper function to test for NotFound error
func LifecycleConfigurationNotFound ¶ added in v0.12.0
LifecycleConfigurationNotFound is parses the aws Error and validates if the lifecycle configuration does not exist
func MethodNotSupported ¶ added in v0.15.0
MethodNotSupported is parses the aws Error and validates if the method is allowed for a request
func ReplicationConfigurationNotFound ¶ added in v0.12.0
ReplicationConfigurationNotFound is parses the aws Error and validates if the replication configuration does not exist
func SSEConfigurationNotFound ¶ added in v0.12.0
SSEConfigurationNotFound is parses the aws Error and validates if the SSE configuration does not exist
func Serialize ¶ added in v0.15.0
func Serialize(p v1alpha2.BucketPolicyParameters) (interface{}, error)
Serialize is the custom marshaller for the BucketPolicyParameters
func SerializeAWSPrincipal ¶ added in v0.15.0
func SerializeAWSPrincipal(p v1alpha2.AWSPrincipal) *string
SerializeAWSPrincipal converts an AWSPrincipal to a string
func SerializeBucketCondition ¶ added in v0.15.0
SerializeBucketCondition converts the string -> Condition map into a serialized version
func SerializeBucketPolicyStatement ¶ added in v0.15.0
func SerializeBucketPolicyStatement(p v1alpha2.BucketPolicyStatement) (interface{}, error)
SerializeBucketPolicyStatement is the custom marshaller for the BucketPolicyStatement
func SerializeBucketPrincipal ¶ added in v0.15.0
func SerializeBucketPrincipal(p *v1alpha2.BucketPrincipal) (interface{}, error)
SerializeBucketPrincipal is the custom serializer for the BucketPrincipal
func SortS3TagSet ¶ added in v0.13.0
SortS3TagSet stable sorts an external s3 tag list by the key and value.
func TaggingNotFound ¶ added in v0.12.0
TaggingNotFound is parses the aws Error and validates if the tagging configuration does not exist
func UpdateBucketACL ¶ added in v0.12.0
UpdateBucketACL creates the ACLInput, sends the request to put an ACL based on the bucket
func WebsiteConfigurationNotFound ¶ added in v0.12.0
WebsiteConfigurationNotFound is parses the aws Error and validates if the website configuration does not exist
Types ¶
type BucketClient ¶ added in v0.12.0
type BucketClient interface { HeadBucketRequest(input *s3.HeadBucketInput) s3.HeadBucketRequest CreateBucketRequest(input *s3.CreateBucketInput) s3.CreateBucketRequest DeleteBucketRequest(input *s3.DeleteBucketInput) s3.DeleteBucketRequest PutBucketEncryptionRequest(input *s3.PutBucketEncryptionInput) s3.PutBucketEncryptionRequest GetBucketEncryptionRequest(input *s3.GetBucketEncryptionInput) s3.GetBucketEncryptionRequest DeleteBucketEncryptionRequest(input *s3.DeleteBucketEncryptionInput) s3.DeleteBucketEncryptionRequest PutBucketVersioningRequest(input *s3.PutBucketVersioningInput) s3.PutBucketVersioningRequest GetBucketVersioningRequest(input *s3.GetBucketVersioningInput) s3.GetBucketVersioningRequest PutBucketAccelerateConfigurationRequest(input *s3.PutBucketAccelerateConfigurationInput) s3.PutBucketAccelerateConfigurationRequest GetBucketAccelerateConfigurationRequest(input *s3.GetBucketAccelerateConfigurationInput) s3.GetBucketAccelerateConfigurationRequest PutBucketCorsRequest(input *s3.PutBucketCorsInput) s3.PutBucketCorsRequest GetBucketCorsRequest(input *s3.GetBucketCorsInput) s3.GetBucketCorsRequest DeleteBucketCorsRequest(input *s3.DeleteBucketCorsInput) s3.DeleteBucketCorsRequest PutBucketWebsiteRequest(input *s3.PutBucketWebsiteInput) s3.PutBucketWebsiteRequest GetBucketWebsiteRequest(input *s3.GetBucketWebsiteInput) s3.GetBucketWebsiteRequest DeleteBucketWebsiteRequest(input *s3.DeleteBucketWebsiteInput) s3.DeleteBucketWebsiteRequest PutBucketLoggingRequest(input *s3.PutBucketLoggingInput) s3.PutBucketLoggingRequest GetBucketLoggingRequest(input *s3.GetBucketLoggingInput) s3.GetBucketLoggingRequest PutBucketReplicationRequest(input *s3.PutBucketReplicationInput) s3.PutBucketReplicationRequest GetBucketReplicationRequest(input *s3.GetBucketReplicationInput) s3.GetBucketReplicationRequest DeleteBucketReplicationRequest(input *s3.DeleteBucketReplicationInput) s3.DeleteBucketReplicationRequest PutBucketRequestPaymentRequest(input *s3.PutBucketRequestPaymentInput) s3.PutBucketRequestPaymentRequest GetBucketRequestPaymentRequest(input *s3.GetBucketRequestPaymentInput) s3.GetBucketRequestPaymentRequest PutBucketTaggingRequest(input *s3.PutBucketTaggingInput) s3.PutBucketTaggingRequest GetBucketTaggingRequest(input *s3.GetBucketTaggingInput) s3.GetBucketTaggingRequest DeleteBucketTaggingRequest(input *s3.DeleteBucketTaggingInput) s3.DeleteBucketTaggingRequest PutBucketAnalyticsConfigurationRequest(input *s3.PutBucketAnalyticsConfigurationInput) s3.PutBucketAnalyticsConfigurationRequest GetBucketAnalyticsConfigurationRequest(input *s3.GetBucketAnalyticsConfigurationInput) s3.GetBucketAnalyticsConfigurationRequest PutBucketLifecycleConfigurationRequest(input *s3.PutBucketLifecycleConfigurationInput) s3.PutBucketLifecycleConfigurationRequest GetBucketLifecycleConfigurationRequest(input *s3.GetBucketLifecycleConfigurationInput) s3.GetBucketLifecycleConfigurationRequest DeleteBucketLifecycleRequest(input *s3.DeleteBucketLifecycleInput) s3.DeleteBucketLifecycleRequest PutBucketNotificationConfigurationRequest(input *s3.PutBucketNotificationConfigurationInput) s3.PutBucketNotificationConfigurationRequest GetBucketNotificationConfigurationRequest(input *s3.GetBucketNotificationConfigurationInput) s3.GetBucketNotificationConfigurationRequest GetBucketAclRequest(*s3.GetBucketAclInput) s3.GetBucketAclRequest PutBucketAclRequest(*s3.PutBucketAclInput) s3.PutBucketAclRequest }
BucketClient is the interface for Client for making S3 Bucket requests.
func NewClient ¶
func NewClient(cfg aws.Config) BucketClient
NewClient returns a new client using AWS credentials as JSON encoded data.
type BucketPolicyClient ¶ added in v0.12.0
type BucketPolicyClient interface { GetBucketPolicyRequest(input *s3.GetBucketPolicyInput) s3.GetBucketPolicyRequest PutBucketPolicyRequest(input *s3.PutBucketPolicyInput) s3.PutBucketPolicyRequest DeleteBucketPolicyRequest(input *s3.DeleteBucketPolicyInput) s3.DeleteBucketPolicyRequest }
BucketPolicyClient is the external client used for S3BucketPolicy Custom Resource
func NewBucketPolicyClient ¶ added in v0.12.0
func NewBucketPolicyClient(cfg aws.Config) BucketPolicyClient
NewBucketPolicyClient returns a new client given an aws config