MCPcopy Create free account
hub / github.com/Scalingo/cli / Details

Function Details

notifiers/details.go:18–36  ·  view source on GitHub ↗
(ctx context.Context, app, ID string)

Source from the content-addressed store, hash-verified

16)
17
18func 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
38func displayDetails(notifier scalingo.DetailedNotifier, types []scalingo.EventType) {
39 t := tablewriter.NewWriter(os.Stdout)

Callers 1

notifiers.goFile · 0.92

Calls 2

ScalingoClientFunction · 0.92
displayDetailsFunction · 0.85

Tested by

no test coverage detected