connector

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2015 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Connection

type Connection interface {
	String() string
	GetCacheDirectory() string
	ListObjectsAsFolders(prefix string) ([]Object, error)
	ListObjectsAsAll(prefix string) ([]Object, error)
	Get(key string) (string, error)
	CachedGet(key string) (string, error)
}

type GoogleCloudStorageConnection

type GoogleCloudStorageConnection struct {
	Context        context.Context
	BucketName     string
	CacheDirectory string
}

func NewGoogleCloudStorageConnection

func NewGoogleCloudStorageConnection(jsonPrivateKeyFilepath string, projectID string, bucketName string,
	cacheDirectory string) (GoogleCloudStorageConnection, error)

func (GoogleCloudStorageConnection) CachedGet

func (conn GoogleCloudStorageConnection) CachedGet(name string) (string, error)

func (GoogleCloudStorageConnection) Get

func (conn GoogleCloudStorageConnection) Get(name string) (string, error)

func (GoogleCloudStorageConnection) GetCacheDirectory

func (c GoogleCloudStorageConnection) GetCacheDirectory() string

func (GoogleCloudStorageConnection) ListObjectsAsAll

func (conn GoogleCloudStorageConnection) ListObjectsAsAll(prefix string) ([]Object, error)

func (GoogleCloudStorageConnection) ListObjectsAsFolders

func (conn GoogleCloudStorageConnection) ListObjectsAsFolders(prefix string) ([]Object, error)

func (GoogleCloudStorageConnection) String

type GoogleCloudStorageObject

type GoogleCloudStorageObject struct {
	Name string
}

func (GoogleCloudStorageObject) GetPath

func (o GoogleCloudStorageObject) GetPath() string

func (GoogleCloudStorageObject) String

func (o GoogleCloudStorageObject) String() string

type Object

type Object interface {
	GetPath() string
}

type S3Connection

type S3Connection struct {
	Connection     *s3.S3
	BucketName     string
	CacheDirectory string
	Downloader     *s3manager.Downloader
}

func NewS3Connection

func NewS3Connection(connection *s3.S3, cacheDirectory string, s3BucketName string,
	options *s3manager.DownloadOptions) S3Connection

func (S3Connection) CachedGet

func (conn S3Connection) CachedGet(key string) (string, error)

func (S3Connection) Get

func (conn S3Connection) Get(key string) (string, error)

func (S3Connection) GetCacheDirectory

func (c S3Connection) GetCacheDirectory() string

func (S3Connection) ListObjectsAsAll

func (conn S3Connection) ListObjectsAsAll(prefix string) ([]Object, error)

func (S3Connection) ListObjectsAsFolders

func (conn S3Connection) ListObjectsAsFolders(prefix string) ([]Object, error)

func (S3Connection) String

func (c S3Connection) String() string

type S3Object

type S3Object struct {
	S3FullPath string
}

func (S3Object) GetPath

func (s3Obj S3Object) GetPath() string

func (S3Object) String

func (s3Obj S3Object) String() string

Jump to

Keyboard shortcuts

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