David Townley 2 gadi atpakaļ
vecāks
revīzija
bddb3324d5
1 mainītis faili ar 19 papildinājumiem un 0 dzēšanām
  1. 19 0
      api/client/registry.go

+ 19 - 0
api/client/registry.go

@@ -216,6 +216,25 @@ func (c *Client) GetACRAuthorizationToken(
 	return resp, err
 }
 
+// GetACRDockerConfigFile gets an ACR Docker config file
+func (c *Client) GetACRDockerConfigFile(
+	ctx context.Context,
+	projectID uint,
+) (*types.GetRegistryTokenResponse, error) {
+	resp := &types.GetRegistryTokenResponse{}
+
+	err := c.getRequest(
+		fmt.Sprintf(
+			"/projects/%d/registries/acr/token",
+			projectID,
+		),
+		nil,
+		resp,
+	)
+
+	return resp, err
+}
+
 // GetDockerhubAuthorizationToken gets a Docker Hub authorization token
 func (c *Client) GetDockerhubAuthorizationToken(
 	ctx context.Context,