MCPcopy
hub / github.com/kopia/kopia / getProfileSummary

Function getProfileSummary

cli/command_notification_profile_list.go:71–86  ·  view source on GitHub ↗
(ctx context.Context, pc notifyprofile.Config)

Source from the content-addressed store, hash-verified

69}
70
71func getProfileSummary(ctx context.Context, pc notifyprofile.Config) notifyprofile.Summary {
72 var summ notifyprofile.Summary
73
74 summ.ProfileName = pc.ProfileName
75 summ.Type = string(pc.MethodConfig.Type)
76 summ.MinSeverity = int32(pc.MinSeverity)
77
78 // Provider returns a new instance of the notification provider.
79 if prov, err := sender.GetSender(ctx, pc.ProfileName, pc.MethodConfig.Type, pc.MethodConfig.Config); err == nil {
80 summ.Summary = prov.Summary()
81 } else {
82 summ.Summary = fmt.Sprintf("%v - invalid", pc.MethodConfig.Type)
83 }
84
85 return summ
86}

Callers 2

runMethod · 0.85
runMethod · 0.85

Calls 2

GetSenderFunction · 0.92
SummaryMethod · 0.65

Tested by

no test coverage detected