github.com/aavshr/aws-sdk-go@v1.41.3/service/s3control/customizations.go (about) 1 package s3control 2 3 import ( 4 "github.com/aavshr/aws-sdk-go/aws/client" 5 "github.com/aavshr/aws-sdk-go/aws/request" 6 "github.com/aavshr/aws-sdk-go/internal/s3shared/arn" 7 "github.com/aavshr/aws-sdk-go/internal/s3shared/s3err" 8 ) 9 10 func init() { 11 initClient = defaultInitClientFn 12 } 13 14 func defaultInitClientFn(c *client.Client) { 15 // Support building custom endpoints based on config 16 c.Handlers.Build.PushFrontNamed(request.NamedHandler{ 17 Name: "s3ControlEndpointHandler", 18 Fn: endpointHandler, 19 }) 20 21 // S3 uses custom error unmarshaling logic 22 c.Handlers.UnmarshalError.PushBackNamed(s3err.RequestFailureWrapperHandler()) 23 } 24 25 // endpointARNGetter is an accessor interface to grab the 26 // the field corresponding to an endpoint ARN input. 27 type endpointARNGetter interface { 28 getEndpointARN() (arn.Resource, error) 29 hasEndpointARN() bool 30 updateArnableField(string) (interface{}, error) 31 } 32 33 // endpointOutpostIDGetter is an accessor interface to grab the 34 // the field corresponding to an outpost ID input. 35 type endpointOutpostIDGetter interface { 36 getOutpostID() (string, error) 37 hasOutpostID() bool 38 } 39 40 // accountIDValidator is an accessor interface to validate the 41 // account id member value and account id present in endpoint ARN. 42 type accountIDValidator interface { 43 updateAccountID(string) (interface{}, error) 44 }