Documentation ¶
Overview ¶
Package client provides tools to interact with a varda server.
Index ¶
- type Client
- func (c *Client) Close() error
- func (c *Client) Do(r *http.Request) (*http.Response, error)
- func (c *Client) Endpoint(name string) string
- func (c *Client) Fetch(ctx context.Context, v varda.Ref) (io.ReadCloser, error)
- func (c *Client) FindRef(ctx context.Context, sha string) (varda.Ref, error)
- func (c *Client) IterRef(ctx context.Context, f func(v varda.Ref) error) error
- func (c *Client) Login(ctx context.Context) error
- func (c *Client) NumRef(ctx context.Context) (int64, error)
- func (c *Client) Query(ctx context.Context, qry search.Query) (*search.Result, error)
- func (c *Client) Search(ctx context.Context, qry search.Query, f func(ref varda.Ref) error) error
- func (c *Client) Upload(ctx context.Context, f varda.File) (varda.Ref, error)
- func (c *Client) UploadRefs(ctx context.Context, vs []varda.File) ([]varda.Ref, error)
- type Option
- type UploadError
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
}
Client provides access to a Varda server. After use, a Client should be closed via its Close method.
type Option ¶
type Option func(c *Client)
Option provides configuration of a varda client.
type UploadError ¶
UploadError describes which varda resources failed to upload.
func (UploadError) Error ¶
func (ue UploadError) Error() string
func (UploadError) Unwrap ¶
func (ue UploadError) Unwrap() error
Click to show internal directories.
Click to hide internal directories.