Documentation
¶
Overview ¶
Package pathio is a package that allows writing to and reading from different types of paths transparently. It supports two types of paths:
- Local file paths
- S3 File Paths (s3://bucket/key)
Note that using s3 paths requires setting two environment variables
- AWS_SECRET_ACCESS_KEY
- AWS_ACCESS_KEY_ID
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Reader ¶
func Reader(path string) (rc io.ReadCloser, err error)
Reader returns an io.Reader for the specified path. The path can either be a local file path or an S3 path. It is the caller's responsibility to close rc.
func Write ¶
Write writes a byte array to the specified path. The path can be either a local file path or an S3 path.
func WriteReader ¶
func WriteReader(path string, input io.ReadSeeker) error
WriteReader writes all the data read from the specified io.Reader to the output path. The path can either a local file path or an S3 path.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.