(ctx context.Context, key string)
| 47 | } |
| 48 | |
| 49 | func (m StoreResolver) GetRuntimeConfig(ctx context.Context, key string) (string, error) { |
| 50 | val, err := m.db.GetRuntimeConfig(ctx, key) |
| 51 | if err != nil { |
| 52 | if errors.Is(err, sql.ErrNoRows) { |
| 53 | return "", xerrors.Errorf("%q: %w", key, ErrEntryNotFound) |
| 54 | } |
| 55 | return "", xerrors.Errorf("fetch %q: %w", key, err) |
| 56 | } |
| 57 | |
| 58 | return val, nil |
| 59 | } |
| 60 | |
| 61 | func (m StoreResolver) UpsertRuntimeConfig(ctx context.Context, key, val string) error { |
| 62 | err := m.db.UpsertRuntimeConfig(ctx, database.UpsertRuntimeConfigParams{Key: key, Value: val}) |
nothing calls this directly
no test coverage detected