// GetDeployPlan fetches a deploymnent plan from Skuid Platform API
GetDeployPlan fetches a deploymnent plan from Skuid Platform API
// GetDeployPlan fetches a deploymnent plan from Skuid Platform API
func (api *RestApi) GetDeployPlan(payload io.Reader, verbose bool) (map[string]types.Plan, error) {
	if verbose {
		fmt.Println(text.VerboseSection("Getting Deploy Plan"))
	}
	planStart := time.Now()
	planResult, err := api.Connection.MakeRequest(
		http.MethodPost,
		"/metadata/deploy/plan",
		payload,
		"application/zip",
	)
	if err != nil {
		return nil, err
	}
	if verbose {
		fmt.Println(text.SuccessWithTime("Success Getting Deploy Plan", planStart))
	}
	defer (*planResult).Close()
	var plans map[string]types.Plan
	if err := json.NewDecoder(*planResult).Decode(&plans); err != nil {
		return nil, err
	}
	return plans, nil
}
func ( api * RestApi ) GetDeployPlan ( payload io . Reader , verbose bool ) ( map [ string ] types . Plan , error ) { if verbose { fmt . Println ( text . VerboseSection ( " " ) ) } planStart := time . Now ( ) planResult , err := api . Connection . MakeRequest ( http . MethodPost , " " , payload , " " , ) if err != nil { return nil , err } if verbose { fmt . Println ( text . SuccessWithTime ( " " , planStart ) ) } defer ( * planResult ) . Close ( ) var plans map [ string ] types . Plan if err := json . NewDecoder ( * planResult ) . Decode ( & plans ) ; err != nil { return nil , err } return plans , nil }
GetDeployPlan fetches a deploymnent plan from Skuid Platform API
GetDeployPlan fetches a deploymnent plan from Skuid Platform API
// Get a deploy plan