(ctx context.Context, feature codersdk.CryptoKeyFeature)
| 67 | } |
| 68 | |
| 69 | func (d *DBFetcher) Fetch(ctx context.Context, feature codersdk.CryptoKeyFeature) ([]codersdk.CryptoKey, error) { |
| 70 | keys, err := d.DB.GetCryptoKeysByFeature(ctx, database.CryptoKeyFeature(feature)) |
| 71 | if err != nil { |
| 72 | return nil, xerrors.Errorf("get crypto keys by feature: %w", err) |
| 73 | } |
| 74 | |
| 75 | return toSDKKeys(keys), nil |
| 76 | } |
| 77 | |
| 78 | // cache implements the caching functionality for both signing and encryption keys. |
| 79 | type cache struct { |
nothing calls this directly
no test coverage detected