Documentation ¶
Index ¶
- Constants
- func NewWriterWithACL(ctx context.Context, bucket *blob.Bucket, path string, acl string) (*blob.Writer, error)
- func SetACLWriterOptionsWithContext(ctx context.Context, key interface{}, acl string) context.Context
- 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)
- 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, 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 SetACLWriterOptionsWithContext ¶
func SetACLWriterOptionsWithContext(ctx context.Context, key interface{}, acl string) context.Context
SetACLWriterOptionsWithContext return a new context.Context instance with a gocloud.dev/blob.WriterOptions instance used to assign 'acl' permissions for all S3 blob writes. The WriterOptions instance is assigned to the new context with key 'key' and is assumed to be retrieved later by code using blob.NewWriter instances. This method is DEPRECATED. Please use SetWriterOptionsWithContext() instead.
func SetWriterOptionsWithContext ¶ added in v0.1.1
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 ¶ added in v0.1.2
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.