MCPcopy
hub / github.com/PatchMon/PatchMon / GetFirst

Method GetFirst

server-source-code/internal/store/settings.go:25–33  ·  view source on GitHub ↗

GetFirst returns the first (and typically only) settings row.

(ctx context.Context)

Source from the content-addressed store, hash-verified

23
24// GetFirst returns the first (and typically only) settings row.
25func (s *SettingsStore) GetFirst(ctx context.Context) (*models.Settings, error) {
26 d := s.db.DB(ctx)
27 setting, err := d.Queries.GetFirstSettings(ctx)
28 if err != nil {
29 return nil, err
30 }
31 out := dbSettingToModel(setting)
32 return &out, nil
33}
34
35// Update updates settings by ID.
36func (s *SettingsStore) Update(ctx context.Context, settings *models.Settings) error {

Callers 15

ProcessServerUpdateFunction · 0.95
sendMetricsMethod · 0.95
NewRouterFunction · 0.95
mainFunction · 0.95
CreateMethod · 0.80
GetSettingsMethod · 0.80
ImportFromEnvMethod · 0.80
UpdateSettingsMethod · 0.80
SignupEnabledMethod · 0.80
SignupMethod · 0.80
timezoneForRequestMethod · 0.80
GetMethod · 0.80

Calls 3

dbSettingToModelFunction · 0.85
DBMethod · 0.65
GetFirstSettingsMethod · 0.65

Tested by

no test coverage detected