Documentation ¶
Index ¶
- type Client
- func (c *Client) Describe(ctx context.Context, digest string) (*ResourceInfo, error)
- func (c *Client) Download(ctx context.Context, w io.Writer, digest string) error
- func (c *Client) Upload(ctx context.Context, r io.Reader, filename, digest string) (*UpDownStatus, error)
- func (c *Client) UploadFile(ctx context.Context, filepath string) (*UpDownStatus, error)
- type ClientOpts
- type Downloader
- type DownloaderUploader
- type ProgressStatusChan
- type ResourceInfo
- type UpDownStatus
- type Uploader
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { // channel to send progress status to the go-routine that's rendering the progress bar ProgressStatus ProgressStatusChan // contains filtered or unexported fields }
func New ¶
func New(conn *grpc.ClientConn, opts ...ClientOpts) *Client
func (*Client) Describe ¶
Describe returns the metadata of a resource by its digest We use this to get the filename and the total size of the artifact
func (*Client) Download ¶
Download downloads a file from the CAS and writes it to the provided writer
func (*Client) UploadFile ¶
Uploads a given file to a CAS server
type ClientOpts ¶
type ClientOpts func(u *Client)
func WithLogger ¶
func WithLogger(l zerolog.Logger) ClientOpts
type Downloader ¶
type DownloaderUploader ¶
type DownloaderUploader interface { Downloader Uploader }
type ProgressStatusChan ¶
type ProgressStatusChan chan (*UpDownStatus)
type ResourceInfo ¶
type UpDownStatus ¶
Click to show internal directories.
Click to hide internal directories.