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

Add method to refresh image tags SHAs #198

Merged
merged 2 commits into from
Dec 3, 2020
Merged
Changes from 1 commit
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
Next Next commit
add refresh image tags shas
  • Loading branch information
jmcampanini committed Dec 3, 2020
commit 1d175f12ec3e4a3c4d27b33cf7da14e14e8db10f
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/images/"+imageID, req, nil)
}

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