Documentation ¶
Index ¶
- Constants
- func NewWriterWithACL(ctx context.Context, bucket *blob.Bucket, path string, str_acl string) (*blob.Writer, error)
- func SetWriterOptionsWithContext(ctx context.Context, ctx_key interface{}, opt_key string, ...) (context.Context, error)
- func SetWriterOptionsWithContextAndMap(ctx context.Context, ctx_key interface{}, opts map[string]interface{}) (context.Context, error)
- func StringACLToObjectCannedACL(str_acl string) (types.ObjectCannedACL, error)
- type AsFunc
- type URLOpener
Constants ¶
const Scheme = "s3blob"
Variables ¶
This section is empty.
Functions ¶
func NewWriterWithACL ¶ added in v0.2.0
func NewWriterWithACL(ctx context.Context, bucket *blob.Bucket, path string, str_acl string) (*blob.Writer, error)
NewWriterWithACL returns a new `blob.Writer` instance that has been configured with the relevant `blob.WriterOptions` to ensure that files written to S3 will be done using AWS ACL permissions defined in 'acl'.
func SetWriterOptionsWithContext ¶
func SetWriterOptionsWithContext(ctx context.Context, ctx_key interface{}, opt_key string, opt_value interface{}) (context.Context, error)
SetACLWriterOptionsWithContext return a new context.Context instance with a gocloud.dev/blob.WriterOptions instance whose properties are assigned according to 'opt_key' and 'opt_value', where the latter is a valid blob.WriterOptions property and the former is a valid type for that property. The one special-case is the "ACL" opt_key which which takes a opt_value of type type string and will assign a suitable GoCloud BeforeWrite option for assigning AWS S3 ACL permissions.
The WriterOptions instance is assigned to the new context with key 'ctx_key' and is assumed to be retrieved later by code using blob.NewWriter instances.
func SetWriterOptionsWithContextAndMap ¶
func SetWriterOptionsWithContextAndMap(ctx context.Context, ctx_key interface{}, opts map[string]interface{}) (context.Context, error)
SetWriterOptionsWithContextAndMap is a convenience method for invoking SetWriterOptionsWithContext multiple times.
func StringACLToObjectCannedACL ¶
func StringACLToObjectCannedACL(str_acl string) (types.ObjectCannedACL, error)
StringACLToObjectCannedACL resolves a subset of the string values for S3 ACLs (those specific to objects) to their corresponding `github.com/aws/aws-sdk-go-v2/service/s3/types.ObjectCannedACL` instance.