client

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Blob

type Blob struct {
	Segments     int   `json:"segments"`
	Compressed   int64 `json:"compressed"`
	Uncompressed int64 `json:"uncompressed"`
}

type Bucket added in v1.0.3

type Bucket struct {
	Key         string `json:"key"`
	Name        string `json:"name"`
	Description string `json:"description"`
	Compression string `json:"compression"`
	Encryption  string `json:"encryption"`
}

type Client

type Client struct {
	URL          string
	ControlToken string

	Client *http.Client
}

func (*Client) Buckets added in v1.0.3

func (c *Client) Buckets() ([]Bucket, error)

func (*Client) Expunge

func (c *Client) Expunge(target string) error

func (*Client) Get

func (c *Client) Get(id, token string) (io.ReadCloser, error)

func (*Client) NewDownload

func (c *Client) NewDownload(target string) (*Stream, error)

func (*Client) NewUpload

func (c *Client) NewUpload(target string) (*Stream, error)

func (*Client) Ping added in v1.0.3

func (c *Client) Ping() (string, error)

func (*Client) Put

func (c *Client) Put(id, token string, in io.Reader, eof bool) (int64, error)

type Stream

type Stream struct {
	Kind    string    `json:"kind"`
	ID      string    `json:"id"`
	Canon   string    `json:"canon"`
	Token   string    `json:"token"`
	Expires time.Time `json:"expires"`
}

Jump to

Keyboard shortcuts

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