MCPcopy Index your code
hub / github.com/kopia/kopia / handleNotificationProfileDelete

Function handleNotificationProfileDelete

internal/server/api_notification_profile.go:61–71  ·  view source on GitHub ↗
(ctx context.Context, rc requestContext)

Source from the content-addressed store, hash-verified

59}
60
61func handleNotificationProfileDelete(ctx context.Context, rc requestContext) (any, *apiError) {
62 if err := repo.WriteSession(ctx, rc.rep, repo.WriteSessionOptions{
63 Purpose: "NotificationProfileDelete",
64 }, func(ctx context.Context, w repo.RepositoryWriter) error {
65 return notifyprofile.DeleteProfile(ctx, w, rc.muxVar("profileName"))
66 }); err != nil {
67 return nil, internalServerError(err)
68 }
69
70 return &serverapi.Empty{}, nil
71}
72
73func handleNotificationProfileList(ctx context.Context, rc requestContext) (any, *apiError) {
74 profiles, err := notifyprofile.ListProfiles(ctx, rc.rep)

Callers

nothing calls this directly

Calls 4

WriteSessionFunction · 0.92
DeleteProfileFunction · 0.92
internalServerErrorFunction · 0.85
muxVarMethod · 0.80

Tested by

no test coverage detected