@@ -609,11 +609,10 @@ func GetFuncYamlVersion(oldFF map[string]interface{}) int {
609
609
}
610
610
611
611
// UserConfirmedMultiResourceDeletion will prompt the user for confirmation to delete all the the resources
612
- func UserConfirmedMultiResourceDeletion (aps []* modelsv2.App , fns []* modelsv2.Fn , trs [] * modelsv2. Trigger ) bool {
612
+ func UserConfirmedMultiResourceDeletion (aps []* modelsv2.App , fns []* modelsv2.Fn ) bool {
613
613
614
614
apsLen := len (aps )
615
615
fnsLen := len (fns )
616
- trsLen := len (trs )
617
616
618
617
fmt .Println ("You are about to delete the following resources:" )
619
618
if apsLen > 0 {
@@ -622,9 +621,7 @@ func UserConfirmedMultiResourceDeletion(aps []*modelsv2.App, fns []*modelsv2.Fn,
622
621
if fnsLen > 0 {
623
622
fmt .Println (" Functions: " , fnsLen )
624
623
}
625
- if trsLen > 0 {
626
- fmt .Println (" Triggers: " , trsLen )
627
- }
624
+
628
625
fmt .Println ("This operation cannot be undone" )
629
626
fmt .Printf ("Do you wish to proceed? Y/N: " )
630
627
reader := bufio .NewReader (os .Stdin )
@@ -643,22 +640,6 @@ func UserConfirmedMultiResourceDeletion(aps []*modelsv2.App, fns []*modelsv2.Fn,
643
640
return true
644
641
}
645
642
646
- // ListFnsAndTriggersInApp lists all the functions associated with an app and all the triggers associated with each of those functions
647
- func ListFnsAndTriggersInApp (c * cli.Context , client * fnclient.Fn , app * modelsv2.App ) ([]* modelsv2.Fn , []* modelsv2.Trigger , error ) {
648
- fns , err := ListFnsInApp (c , client , app )
649
- if err != nil {
650
- return nil , nil , err
651
- }
652
- var trs []* modelsv2.Trigger
653
- for _ , fn := range fns {
654
- t , err := ListTriggersInFunc (c , client , fn )
655
- if err != nil {
656
- return nil , nil , err
657
- }
658
- trs = append (trs , t ... )
659
- }
660
- return fns , trs , nil
661
- }
662
643
663
644
//DeleteFunctions deletes all the functions provided to it. if provided nil it is a no-op
664
645
func DeleteFunctions (c * cli.Context , client * fnclient.Fn , fns []* modelsv2.Fn ) error {
@@ -677,23 +658,6 @@ func DeleteFunctions(c *cli.Context, client *fnclient.Fn, fns []*modelsv2.Fn) er
677
658
return nil
678
659
}
679
660
680
- //DeleteTriggers deletes all the triggers provided to it. if provided nil it is a no-op
681
- func DeleteTriggers (c * cli.Context , client * fnclient.Fn , triggers []* modelsv2.Trigger ) error {
682
- if triggers == nil {
683
- return nil
684
- }
685
- for _ , t := range triggers {
686
- params := apitriggers .NewDeleteTriggerParams ()
687
- params .TriggerID = t .ID
688
- _ , err := client .Triggers .DeleteTrigger (params )
689
- if err != nil {
690
- return fmt .Errorf ("Failed to Delete trigger %s: %s" , t .Name , err )
691
- }
692
- fmt .Println ("Trigger " , t .Name , " deleted" )
693
- }
694
- return nil
695
- }
696
-
697
661
//ListFnsInApp gets all the functions associated with an app
698
662
func ListFnsInApp (c * cli.Context , client * fnclient.Fn , app * modelsv2.App ) ([]* modelsv2.Fn , error ) {
699
663
params := & apifns.ListFnsParams {
0 commit comments