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 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/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/images/"+imageID+"/tags/update", nil, nil)
}