vfssimple

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2018 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitializeGSFileSystem

func InitializeGSFileSystem() error

func InitializeLocalFileSystem

func InitializeLocalFileSystem()

func InitializeS3FileSystem

func InitializeS3FileSystem(accessKeyId, secretAccessKey, region, token string) error

InitializeS3FileSystem will handle the bare minimum requirements for setting up an s3.FileSystem by setting up an s3 client with the accessKeyId and secreteAccessKey (both required), and an optional session token. It is required before making calls to vfs.NewLocation or vfs.NewFile with s3 URIs to have set this up ahead of time. If you require more in depth configuration of the s3 Client you may set one up yourself and pass the resulting s3iface.S3API to vfs.SetS3Client which will also fulfil this requirement.

func NewFile

func NewFile(uri string) (vfs.File, error)

NewFile is a convenience function that allows for instantiating a file based on a uri string. Any supported file system is supported, though some may require prior configuration. See the docs for specific requirements of each.

func NewLocation

func NewLocation(uri string) (vfs.Location, error)

NewLocation is a convenience function that allows for instantiating a location based on a uri string. "file://", "s3://", and "gs://" are supported, assuming they have been configured ahead of time.

func SetS3Client

func SetS3Client(client s3iface.S3API)

SetS3Client configures an s3.FileSystem with the client passed to it. This will be used by vfs when calling vfs.NewLocation or vfs.NewFile with an s3 URI. If you don't want to bother configuring the client manually vfs.InitializeS3FileSystem() will handle the client set up with the minimum required arguments (an access key id and secret access key.)

Types

This section is empty.

Jump to

Keyboard shortcuts

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