@@ -157,8 +157,7 @@ func getCollections() []keyfactor_command_client_api.KeyfactorApiModelsCertifica
157157 kfClient := initGenClient ()
158158 collections , _ , reqErr := kfClient .CertificateCollectionApi .CertificateCollectionGetCollections (context .Background ()).XKeyfactorRequestedWith (xKeyfactorRequestedWith ).XKeyfactorApiVersion (xKeyfactorApiVersion ).Execute ()
159159 if reqErr != nil {
160- fmt .Printf ("Error, unable to get collections %s\n " , reqErr )
161- log .Fatalf ("Error: %s" , reqErr )
160+ fmt .Printf ("%s Error! Unable to get collections %s%s\n " , colorRed , reqErr , colorWhite )
162161 }
163162 var lCollectionReq []keyfactor_command_client_api.KeyfactorApiModelsCertificateCollectionsCertificateCollectionCreateRequest
164163 for _ , collection := range collections {
@@ -180,8 +179,7 @@ func getMetadata() []keyfactor_command_client_api.KeyfactorApiModelsMetadataFiel
180179 kfClient := initGenClient ()
181180 metadata , _ , reqErr := kfClient .MetadataFieldApi .MetadataFieldGetAllMetadataFields (context .Background ()).XKeyfactorRequestedWith (xKeyfactorRequestedWith ).XKeyfactorApiVersion (xKeyfactorApiVersion ).Execute ()
182181 if reqErr != nil {
183- fmt .Printf ("Error, unable to get metadata %s\n " , reqErr )
184- log .Fatalf ("Error: %s" , reqErr )
182+ fmt .Printf ("%s Error! Unable to get metadata %s%s\n " , colorRed , reqErr , colorWhite )
185183 }
186184 var lMetadataReq []keyfactor_command_client_api.KeyfactorApiModelsMetadataFieldMetadataFieldCreateRequest
187185 for _ , metadataItem := range metadata {
@@ -202,8 +200,7 @@ func getExpirationAlerts() []keyfactor_command_client_api.KeyfactorApiModelsAler
202200 kfClient := initGenClient ()
203201 alerts , _ , reqErr := kfClient .ExpirationAlertApi .ExpirationAlertGetExpirationAlerts (context .Background ()).XKeyfactorRequestedWith (xKeyfactorRequestedWith ).XKeyfactorApiVersion (xKeyfactorApiVersion ).Execute ()
204202 if reqErr != nil {
205- fmt .Printf ("Error, unable to get expiration alerts %s\n " , reqErr )
206- log .Fatalf ("Error: %s" , reqErr )
203+ fmt .Printf ("%s Error! Unable to get expiration alerts %s%s\n " , colorRed , reqErr , colorWhite )
207204 }
208205 var lAlertReq []keyfactor_command_client_api.KeyfactorApiModelsAlertsExpirationExpirationAlertCreationRequest
209206 for _ , alert := range alerts {
@@ -223,8 +220,7 @@ func getIssuedAlerts() []keyfactor_command_client_api.KeyfactorApiModelsAlertsIs
223220 kfClient := initGenClient ()
224221 alerts , _ , reqErr := kfClient .IssuedAlertApi .IssuedAlertGetIssuedAlerts (context .Background ()).XKeyfactorRequestedWith (xKeyfactorRequestedWith ).XKeyfactorApiVersion (xKeyfactorApiVersion ).Execute ()
225222 if reqErr != nil {
226- fmt .Printf ("Error, unable to get issued cert alerts %s\n " , reqErr )
227- log .Fatalf ("Error: %s" , reqErr )
223+ fmt .Printf ("%s Error! Unable to get issued cert alerts %s%s\n " , colorRed , reqErr , colorWhite )
228224 }
229225 var lAlertReq []keyfactor_command_client_api.KeyfactorApiModelsAlertsIssuedIssuedAlertCreationRequest
230226 for _ , alert := range alerts {
@@ -245,8 +241,7 @@ func getDeniedAlerts() []keyfactor_command_client_api.KeyfactorApiModelsAlertsDe
245241 kfClient := initGenClient ()
246242 alerts , _ , reqErr := kfClient .DeniedAlertApi .DeniedAlertGetDeniedAlerts (context .Background ()).XKeyfactorRequestedWith (xKeyfactorRequestedWith ).XKeyfactorApiVersion (xKeyfactorApiVersion ).Execute ()
247243 if reqErr != nil {
248- fmt .Printf ("Error, unable to get denied cert alerts %s\n " , reqErr )
249- log .Fatalf ("Error: %s" , reqErr )
244+ fmt .Printf ("%s Error! Unable to get denied cert alerts %s%s\n " , colorRed , reqErr , colorWhite )
250245 }
251246 var lAlertReq []keyfactor_command_client_api.KeyfactorApiModelsAlertsDeniedDeniedAlertCreationRequest
252247 for _ , alert := range alerts {
@@ -267,8 +262,7 @@ func getPendingAlerts() []keyfactor_command_client_api.KeyfactorApiModelsAlertsP
267262 kfClient := initGenClient ()
268263 alerts , _ , reqErr := kfClient .PendingAlertApi .PendingAlertGetPendingAlerts (context .Background ()).XKeyfactorRequestedWith (xKeyfactorRequestedWith ).XKeyfactorApiVersion (xKeyfactorApiVersion ).Execute ()
269264 if reqErr != nil {
270- fmt .Printf ("Error, unable to get pending cert alerts %s\n " , reqErr )
271- log .Fatalf ("Error: %s" , reqErr )
265+ fmt .Printf ("%s Error! Unable to get pending cert alerts %s%s\n " , colorRed , reqErr , colorWhite )
272266 }
273267 var lAlertReq []keyfactor_command_client_api.KeyfactorApiModelsAlertsPendingPendingAlertCreationRequest
274268 for _ , alert := range alerts {
@@ -289,8 +283,7 @@ func getSslNetworks() []keyfactor_command_client_api.KeyfactorApiModelsSslCreate
289283 kfClient := initGenClient ()
290284 networks , _ , reqErr := kfClient .SslApi .SslGetNetworks (context .Background ()).XKeyfactorRequestedWith (xKeyfactorRequestedWith ).XKeyfactorApiVersion (xKeyfactorApiVersion ).Execute ()
291285 if reqErr != nil {
292- fmt .Printf ("Error, unable to get SSL networks %s\n " , reqErr )
293- log .Fatalf ("Error: %s" , reqErr )
286+ fmt .Printf ("%s Error! Unable to get SSL networks %s%s\n " , colorRed , reqErr , colorWhite )
294287 }
295288 var lNetworkReq []keyfactor_command_client_api.KeyfactorApiModelsSslCreateNetworkRequest
296289 for _ , network := range networks {
@@ -310,8 +303,7 @@ func getWorkflowDefinitions() []exportKeyfactorApiModelsWorkflowsDefinitionCreat
310303 kfClient := initGenClient ()
311304 workflowDefs , _ , reqErr := kfClient .WorkflowDefinitionApi .WorkflowDefinitionQuery (context .Background ()).XKeyfactorRequestedWith (xKeyfactorRequestedWith ).XKeyfactorApiVersion (xKeyfactorApiVersion ).Execute ()
312305 if reqErr != nil {
313- fmt .Printf ("Error, unable to get workflow definitions %s\n " , reqErr )
314- log .Fatalf ("Error: %s" , reqErr )
306+ fmt .Printf ("%s Error! Unable to get workflow definitions %s%s\n " , colorRed , reqErr , colorWhite )
315307 }
316308 var lWorkflowReq []exportKeyfactorApiModelsWorkflowsDefinitionCreateRequest
317309 for _ , workflowDef := range workflowDefs {
@@ -339,8 +331,7 @@ func getReports() ([]exportModelsReport, []keyfactor_command_client_api.ModelsCu
339331 //Gets all built-in reports
340332 bReports , _ , bErr := kfClient .ReportsApi .ReportsQueryReports (context .Background ()).XKeyfactorRequestedWith (xKeyfactorRequestedWith ).XKeyfactorApiVersion (xKeyfactorApiVersion ).Execute ()
341333 if bErr != nil {
342- fmt .Printf ("Error, unable to get built-in reports %s\n " , bErr )
343- log .Fatalf ("Error: %s" , bErr )
334+ fmt .Printf ("%s Error! Unable to get built-in reports %s%s\n " , colorRed , bErr , colorWhite )
344335 }
345336 var lbReportsReq []exportModelsReport
346337 for _ , bReport := range bReports {
@@ -357,8 +348,7 @@ func getReports() ([]exportModelsReport, []keyfactor_command_client_api.ModelsCu
357348 //Gets all custom reports
358349 cReports , _ , cErr := kfClient .ReportsApi .ReportsQueryCustomReports (context .Background ()).XKeyfactorRequestedWith (xKeyfactorRequestedWith ).XKeyfactorApiVersion (xKeyfactorApiVersion ).Execute ()
359350 if cErr != nil {
360- fmt .Printf ("Error, unable to get custom reports %s\n " , cErr )
361- log .Fatalf ("Error: %s" , cErr )
351+ fmt .Printf ("%s Error! Unable to get custom reports %s%s\n " , colorRed , cErr , colorWhite )
362352 }
363353 var lcReportReq []keyfactor_command_client_api.ModelsCustomReportCreationRequest
364354 for _ , cReport := range cReports {
@@ -378,8 +368,7 @@ func getRoles() []api.CreateSecurityRoleArg {
378368 kfClient , _ := initClient ()
379369 roles , reqErr := kfClient .GetSecurityRoles ()
380370 if reqErr != nil {
381- fmt .Printf ("Error, unable to get roles %s\n " , reqErr )
382- log .Fatalf ("Error: %s" , reqErr )
371+ fmt .Printf ("%s Error! Unable to get security roles %s%s\n " , colorRed , reqErr , colorWhite )
383372 }
384373 var lRoleReq []api.CreateSecurityRoleArg
385374 for _ , role := range roles {
0 commit comments