Documentation ¶
Overview ¶
Package bfss3 abstracts Amazon S3 bucket.
When imported, it registers a global `s3://` scheme resolver and can be used like:
import ( "github.com/bsm/bfs" _ "github.com/bsm/bfs/bfss3" ) func main() { ctx := context.Background() b, _ := bfs.Connect(ctx, "s3://bucket/a&acl=MY_ACL") f, _ := b.Open(ctx, "b/c.txt") // opens s3://bucket/a/b/c.txt ... }
bfs.Connect supports the following query parameters:
aws_access_key_id - custom AWS credentials aws_secret_access_key - custom AWS credentials aws_session_token - custom AWS credentials assume_role - specify an AWS role ARN to assume region - specify an AWS region max_retries - specify maximum number of retries acl - custom ACL, defaults to DefaultACL sse - server-side-encryption algorithm
Index ¶
Constants ¶
View Source
const DefaultACL = "bucket-owner-full-control"
DefaultACL is the default ACL setting.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { // Native AWS configuration. AWS *aws.Config // Custom ACL, defaults to DefaultACL. ACL string // GrantFullControl setting. GrantFullControl string // The Server-side encryption algorithm used when storing this object in S3. SSE string // An optional path prefix Prefix string }
Config is passed to New to configure the S3 connection.
Click to show internal directories.
Click to hide internal directories.