(ctx context.Context, app, ID string)
| 16 | ) |
| 17 | |
| 18 | func Details(ctx context.Context, app, ID string) error { |
| 19 | c, err := config.ScalingoClient(ctx) |
| 20 | if err != nil { |
| 21 | return errors.Wrapf(ctx, err, "fail to get Scalingo client") |
| 22 | } |
| 23 | baseNotifier, err := c.NotifierByID(ctx, app, ID) |
| 24 | if err != nil { |
| 25 | return errors.Wrapf(ctx, err, "get notifier %s on app %s", ID, app) |
| 26 | } |
| 27 | notifier := baseNotifier.Specialize() |
| 28 | |
| 29 | eventTypes, err := c.EventTypesList(ctx) |
| 30 | if err != nil { |
| 31 | return errors.Wrapf(ctx, err, "fail to list event types") |
| 32 | } |
| 33 | |
| 34 | displayDetails(notifier, eventTypes) |
| 35 | return nil |
| 36 | } |
| 37 | |
| 38 | func displayDetails(notifier scalingo.DetailedNotifier, types []scalingo.EventType) { |
| 39 | t := tablewriter.NewWriter(os.Stdout) |
no test coverage detected