Documentation
¶
Overview ¶
Implements a 9p file system that talks to Amazon's S3 Object Storage Service.
Also supports any S3-compatible service as well.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrUseMkDirToCreateBucket = errors.New("create a directory to create a bucket") ErrMustOpenForReading = errors.New("must open for reading results") )
Functions ¶
func New ¶
func New(endpoint string, opt Options) ninep.FileSystem
New returns a reasonable default configuration of an S3 FileSystem, an empty string of endpoint defaults to AWS' S3 service.
Parameters:
- endpoint defaults to AWS' S3 service if it is an empty string.
- opt contains options for configuring the Filesystem
func NewWithAwsConfig ¶
func NewWithAwsConfig(cfg aws.Config, opt Options) ninep.FileSystem
NewWithAwsConfig returns a s3 FileSystem from a given s3 aws.Config object.
Parameters:
- cfg is the aws.Config used to configure the s3 client.
- opt contains options for configuring the Filesystem
func NewWithClient ¶
func NewWithClient(s3c *S3Ctx, opt Options) ninep.FileSystem
NewWithClient returns a s3 FileSystem from a given s3 client and session.
Parameters:
- s3c is the configured s3 client and session. Both fields are required.
- opt contains options for configuring the Filesystem
Types ¶
type Options ¶
type Options struct { Endpoint string // Flatten makes listing an object key prefix returns the full keys instead of // just the logical directory names. This can be more efficient to use S3 // API at the cost of breaking some of the file system abstraction layer. Flatten bool S3PathStyle bool // Logger to use. Default Logger *slog.Logger }
Click to show internal directories.
Click to hide internal directories.