MCPcopy Index your code
hub / github.com/PatchMon/PatchMon / UpdateResolved

Method UpdateResolved

server-source-code/internal/store/alerts.go:277–286  ·  view source on GitHub ↗

UpdateResolved marks alert as resolved.

(ctx context.Context, id string, userID *string)

Source from the content-addressed store, hash-verified

275
276// UpdateResolved marks alert as resolved.
277func (s *AlertsStore) UpdateResolved(ctx context.Context, id string, userID *string) error {
278 d := s.db.DB(ctx)
279 now := time.Now()
280 return d.Queries.UpdateAlertResolved(ctx, db.UpdateAlertResolvedParams{
281 ID: id,
282 IsActive: false,
283 ResolvedAt: pgtime.From(now),
284 ResolvedByUserID: userID,
285 })
286}
287
288// UpdateUnresolve marks alert as active again.
289func (s *AlertsStore) UpdateUnresolve(ctx context.Context, id string) error {

Callers 8

ProcessAgentUpdateFunction · 0.95
ProcessServerUpdateFunction · 0.95
ProcessHostStatusMonitorFunction · 0.95
OnConnectFunction · 0.95
AutoResolveOldAlertsMethod · 0.95
PerformActionMethod · 0.80
BulkActionMethod · 0.80

Calls 2

DBMethod · 0.65
UpdateAlertResolvedMethod · 0.65

Tested by

no test coverage detected