| 1234567891011121314151617181920212223242526272829303132333435363738394041 |
- package client
- import (
- "context"
- "fmt"
- "github.com/porter-dev/porter/api/types"
- )
- // CreateStack creates the stack
- func (c *Client) CreateStack(
- ctx context.Context,
- projectID, clusterID uint,
- req *types.CreateStackReleaseRequest,
- ) error {
- return c.postRequest(
- fmt.Sprintf(
- "/projects/%d/clusters/%d/stacks",
- projectID, clusterID,
- ),
- req,
- nil,
- )
- }
- // UpdateStack updates the stack
- func (c *Client) UpdateStack(
- ctx context.Context,
- projectID, clusterID uint,
- stackName string,
- req *types.CreateStackReleaseRequest,
- ) error {
- return c.patchRequest(
- fmt.Sprintf(
- "/projects/%d/clusters/%d/stacks/%s",
- projectID, clusterID, stackName,
- ),
- req,
- nil,
- )
- }
|