Documentation ¶
Index ¶
- func NewServer(s storage.Storage, urlPref string) http.Handler
- type Client
- func (c *Client) BeginBlob(ctx context.Context) (storage.BlobWriter, error)
- func (c *Client) Close() error
- func (c *Client) DeletePin(ctx context.Context, name string) error
- func (c *Client) FetchBlob(ctx context.Context, ref types.Ref) (io.ReadCloser, uint64, error)
- func (c *Client) GetPin(ctx context.Context, name string) (types.Ref, error)
- func (c *Client) IterateBlobs(ctx context.Context) storage.Iterator
- func (c *Client) IteratePins(ctx context.Context) storage.PinIterator
- func (c *Client) SetHTTPClient(cli *http.Client)
- func (c *Client) SetPin(ctx context.Context, name string, ref types.Ref) error
- func (c *Client) StatBlob(ctx context.Context, ref types.Ref) (uint64, error)
- type Config
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a HTTP client for CAS.
func NewClient ¶
NewClient creates a CAS HTTP client with a given base address.
Example:
NewClient("https://domain.com/cas")
func (*Client) IteratePins ¶
func (c *Client) IteratePins(ctx context.Context) storage.PinIterator
func (*Client) SetHTTPClient ¶
SetHTTPClient allows to set a custom HTTP client that will be used to send requests.
Click to show internal directories.
Click to hide internal directories.