client

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2018 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func MakeClient

func MakeClient(url string) *Client

Client creates a storage service client.

func (*Client) Delete

func (c *Client) Delete(id string) error

func (*Client) Download

func (c *Client) Download(id string, filePath string) error

Download fetches the file identified by ID to the local file path. filePath must not exist.

func (*Client) GetUrl

func (c *Client) GetUrl(id string) string

GetUrl returns an HTTP URL that can be used to download the file pointed to by ID

func (*Client) Upload

func (c *Client) Upload(filePath string, metadata *map[string]string) (string, error)

Upload sends the local file pointed to by filePath to the storage service, along with the metadata. It returns a file ID that can be used to retrieve the file.

Jump to

Keyboard shortcuts

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