openstack

package
v0.0.0-...-0c1db29 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2017 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ERR_NOT_CONNECTED = fmt.Errorf("OpenStack not connected")
)

Functions

This section is empty.

Types

type OpenStack

type OpenStack struct {
	PublicURL string
	Connected bool

	Inner *swift.Connection
	// contains filtered or unexported fields
}

func NewOpenStack

func NewOpenStack(publicURL, username, apiKey, tenantId, authURL string, tempURLKey string, production bool) (*OpenStack, error)

func (*OpenStack) TempAccess

func (o *OpenStack) TempAccess(path string, e time.Duration, fileName string) string

TempAccess provides a URL for the given resource, valid for exp time

func (*OpenStack) Upload

func (o *OpenStack) Upload(localPath, remoteContainer, remotePath, contentType string) error

Upload tries to upload a file from the local filesystem

func (*OpenStack) UploadReader

func (o *OpenStack) UploadReader(file io.Reader, remoteContainer, remotePath, contentType string) error

UploadReader uploads the given stream to the remote container/path, with the given Content Type

Jump to

Keyboard shortcuts

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