MCPcopy Create free account
hub / github.com/cortexproject/cortex / DeactivateConfig

Method DeactivateConfig

pkg/configs/db/postgres/postgres.go:318–324  ·  view source on GitHub ↗

DeactivateConfig deactivates a configuration.

(ctx context.Context, userID string)

Source from the content-addressed store, hash-verified

316
317// DeactivateConfig deactivates a configuration.
318func (d DB) DeactivateConfig(ctx context.Context, userID string) error {
319 cfg, err := d.GetConfig(ctx, userID)
320 if err != nil {
321 return err
322 }
323 return d.SetDeletedAtConfig(ctx, userID, sql.NullTime{Time: time.Now(), Valid: true}, cfg.Config)
324}
325
326// RestoreConfig restores configuration.
327func (d DB) RestoreConfig(ctx context.Context, userID string) error {

Callers

nothing calls this directly

Implementers 4

timedpkg/configs/db/timed.go
tracedpkg/configs/db/traced.go
DBpkg/configs/db/postgres/postgres.go
DBpkg/configs/db/memory/memory.go

Calls 2

GetConfigMethod · 0.95
SetDeletedAtConfigMethod · 0.95

Tested by

no test coverage detected