github.com/wanddynosios/cli/v8@v8.7.9-0.20240221182337-1a92e3a7017f/api/cloudcontroller/ccv3/manifest.go (about)

     1  package ccv3
     2  
     3  import (
     4  	"code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/internal"
     5  	"code.cloudfoundry.org/cli/resources"
     6  )
     7  
     8  // GetApplicationManifest returns a (YAML) manifest for an application and its
     9  // underlying processes.
    10  func (client *Client) GetApplicationManifest(appGUID string) ([]byte, Warnings, error) {
    11  	bytes, warnings, err := client.MakeRequestReceiveRaw(
    12  		internal.GetApplicationManifestRequest,
    13  		internal.Params{"app_guid": appGUID},
    14  		"application/x-yaml",
    15  	)
    16  
    17  	return bytes, warnings, err
    18  }
    19  
    20  func (client *Client) GetSpaceManifestDiff(spaceGUID string, rawManifest []byte) (resources.ManifestDiff, Warnings, error) {
    21  	var responseBody resources.ManifestDiff
    22  
    23  	_, warnings, err := client.MakeRequestSendRaw(
    24  		internal.PostSpaceDiffManifestRequest,
    25  		internal.Params{"space_guid": spaceGUID},
    26  		rawManifest,
    27  		"application/x-yaml",
    28  		&responseBody,
    29  	)
    30  
    31  	return responseBody, warnings, err
    32  }