Versions in this module Expand all Collapse all v0 v0.1.0 Mar 12, 2018 Changes in this version + var DefaultClient = NewClient(DefaultGateway) + var DefaultGateway = "http://localhost:8500" + type Client struct + Gateway string + func NewClient(gateway string) *Client + func (c *Client) Download(hash, path string) (*File, error) + func (c *Client) DownloadDirectory(hash, path, destDir string) error + func (c *Client) DownloadManifest(hash string) (*api.Manifest, error) + func (c *Client) DownloadRaw(hash string) (io.ReadCloser, error) + func (c *Client) List(hash, prefix string) (*api.ManifestList, error) + func (c *Client) MultipartUpload(hash string, uploader Uploader) (string, error) + func (c *Client) TarUpload(hash string, uploader Uploader) (string, error) + func (c *Client) Upload(file *File, manifest string) (string, error) + func (c *Client) UploadDirectory(dir, defaultPath, manifest string) (string, error) + func (c *Client) UploadManifest(m *api.Manifest) (string, error) + func (c *Client) UploadRaw(r io.Reader, size int64) (string, error) + type DirectoryUploader struct + DefaultPath string + Dir string + func (d *DirectoryUploader) Upload(upload UploadFn) error + type File struct + func Open(path string) (*File, error) + type FileUploader struct + File *File + func (f *FileUploader) Upload(upload UploadFn) error + type UploadFn func(file *File) error + type Uploader interface + Upload func(UploadFn) error + type UploaderFunc func(UploadFn) error + func (u UploaderFunc) Upload(upload UploadFn) error