@@ -21,8 +21,8 @@ import (
21
21
22
22
var (
23
23
ProviderToken string
24
- MesheryApiBaseUrl string
25
- MesheryCloudApiBaseUrl string
24
+ MesheryAPIBaseURL string
25
+ MesheryCloudAPIBaseURL string
26
26
Log logger.Handler
27
27
)
28
28
@@ -51,7 +51,7 @@ var generateKanvasSnapshotCmd = &cobra.Command{
51
51
-e, --email string email address to notify when snapshot is ready (required)
52
52
-h Help for Helm Kanvas Snapshot plugin` ,
53
53
54
- RunE : func (cmd * cobra.Command , args []string ) error {
54
+ RunE : func (_ * cobra.Command , _ []string ) error {
55
55
// Use the extracted name from URI if not provided
56
56
if designName == "" {
57
57
designName = ExtractNameFromURI (chartURI )
@@ -156,7 +156,7 @@ func CreateMesheryDesign(uri, name, email string) (string, error) {
156
156
157
157
sourceType := "Helm Chart"
158
158
encodedChartType := url .PathEscape (sourceType )
159
- fullURL := fmt .Sprintf ("%s/api/pattern/%s" , MesheryApiBaseUrl , encodedChartType )
159
+ fullURL := fmt .Sprintf ("%s/api/pattern/%s" , MesheryAPIBaseURL , encodedChartType )
160
160
161
161
// Create the request
162
162
req , err := http .NewRequest ("POST" , fullURL , bytes .NewBuffer (payloadBytes ))
@@ -167,8 +167,8 @@ func CreateMesheryDesign(uri, name, email string) (string, error) {
167
167
168
168
// Set headers and log them
169
169
req .Header .Set ("Cookie" , ProviderToken )
170
- req .Header .Set ("Origin" , MesheryApiBaseUrl )
171
- req .Header .Set ("Host" , MesheryApiBaseUrl )
170
+ req .Header .Set ("Origin" , MesheryAPIBaseURL )
171
+ req .Header .Set ("Host" , MesheryAPIBaseURL )
172
172
req .Header .Set ("Content-Type" , "text/plain;charset=UTF-8" )
173
173
req .Header .Set ("Accept-Encoding" , "gzip, deflate, br, zstd" )
174
174
req .Header .Set ("Accept-Language" , "en-GB,en-US;q=0.9,en;q=0.8" )
@@ -205,7 +205,7 @@ func CreateMesheryDesign(uri, name, email string) (string, error) {
205
205
return "" , errors .ErrCreatingMesheryDesign (fmt .Errorf ("failed to extract design ID from response" ))
206
206
}
207
207
208
- func GenerateSnapshot (designID , chartURI , email , assetLocation string ) error {
208
+ func GenerateSnapshot (designID , _ , email , assetLocation string ) error {
209
209
payload := map [string ]interface {}{
210
210
"Payload" : map [string ]string {
211
211
"application_type" : "Helm Chart" ,
@@ -224,7 +224,7 @@ func GenerateSnapshot(designID, chartURI, email, assetLocation string) error {
224
224
// Create the POST request
225
225
req , err := http .NewRequest (
226
226
"POST" ,
227
- fmt .Sprintf ("%s/api/integrations/trigger/workflow" , MesheryCloudApiBaseUrl ),
227
+ fmt .Sprintf ("%s/api/integrations/trigger/workflow" , MesheryCloudAPIBaseURL ),
228
228
bytes .NewBuffer (payloadBytes ),
229
229
)
230
230
if err != nil {
@@ -233,7 +233,7 @@ func GenerateSnapshot(designID, chartURI, email, assetLocation string) error {
233
233
234
234
req .Header .Set ("Cookie" , ProviderToken )
235
235
req .Header .Set ("Content-Type" , "application/json" )
236
- req .Header .Set ("Referer" , fmt .Sprintf ("%s/dashboard" , MesheryCloudApiBaseUrl ))
236
+ req .Header .Set ("Referer" , fmt .Sprintf ("%s/dashboard" , MesheryCloudAPIBaseURL ))
237
237
238
238
client := & http.Client {}
239
239
0 commit comments