Skip to content
This repository was archived by the owner on Aug 30, 2024. It is now read-only.

feat: add tag refresh method to coder-sdk #205

Merged
merged 1 commit into from
Dec 17, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions coder-sdk/image.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,3 +77,8 @@ func (c Client) OrganizationImages(ctx context.Context, orgID string) ([]Image,
func (c Client) UpdateImage(ctx context.Context, imageID string, req UpdateImageReq) error {
return c.requestBody(ctx, http.MethodPatch, "/api/private/images/"+imageID, req, nil)
}

// UpdateImageTags refreshes the latest digests for all tags of the image.
func (c Client) UpdateImageTags(ctx context.Context, imageID string) error {
return c.requestBody(ctx, http.MethodPost, "/api/private/images/"+imageID+"/tags/update", nil, nil)
}