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/bfsgs"
)
func main() {
ctx := context.Background()
u, _ := url.Parse("s3://bucket/path/to/file.ext?prefix=my/prefix&acl=MY_ACL")
bucket, _ := bfs.Resolve(ctx, u)
f, _ := bucket.Open(ctx)
...
}
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, used to create a Session,
// unless one is already passed.
AWS aws.Config
// Custom ACL, defaults to DefaultACL.
ACL string
// An optional path prefix
Prefix string
// An optional custom session.
// If nil, a new session will be created using the AWS config.
Session *session.Session
}
Config is passed to New to configure the S3 connection.
Click to show internal directories.
Click to hide internal directories.