client

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

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

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

Documentation

Overview

Package client implements repository REST client.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	*rest.Client
	Short string
}

Client is a Repository that dispatches requests to a server implementing the Repository REST API.

func (*Client) Collect

func (c *Client) Collect(ctx context.Context, live reflow.Liveset) error

Collect instructs the repository collect all objects not in the liveset.

func (*Client) Get

func (c *Client) Get(ctx context.Context, id digest.Digest) (io.ReadCloser, error)

Get retrieves the object with digest id.

func (*Client) Put

func (c *Client) Put(ctx context.Context, body io.Reader) (digest.Digest, error)

Put writes the object in body to the repository.

func (*Client) ReadFrom

func (c *Client) ReadFrom(ctx context.Context, id digest.Digest, u *url.URL) error

ReadFrom reads the object with digest id directly from the repository at URL u.

func (*Client) ShortString

func (c *Client) ShortString() string

func (*Client) Stat

func (c *Client) Stat(ctx context.Context, id digest.Digest) (reflow.File, error)

Stat queries the repository for the file metadata for the given object.

func (*Client) String

func (c *Client) String() string

func (*Client) WriteTo

func (c *Client) WriteTo(ctx context.Context, id digest.Digest, u *url.URL) error

WriteTo writes the object with digest id directly to the repository at URL u.

Jump to

Keyboard shortcuts

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