s3

package
v0.3.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 27, 2024 License: BSD-3-Clause Imports: 9 Imported by: 13

Documentation

Index

Constants

View Source
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.

Types

type AsFunc

type AsFunc func(func(interface{}) bool) error

type URLOpener added in v0.1.0

type URLOpener struct {
	// contains filtered or unexported fields
}

func (*URLOpener) OpenBucketURL added in v0.1.0

func (o *URLOpener) OpenBucketURL(ctx context.Context, u *url.URL) (*blob.Bucket, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL