(ctx context.Context)
| 267 | } |
| 268 | |
| 269 | func PersistentConfigFromCtx(ctx context.Context) (pconfig.Storage, error) { |
| 270 | val := ctx.Value(CtxKeyPersistentConfig) |
| 271 | if val == nil { |
| 272 | return nil, fmt.Errorf("%w: context does not have persistent config set", ErrNotFound) |
| 273 | } |
| 274 | |
| 275 | res, valid := val.(pconfig.Storage) |
| 276 | if !valid { |
| 277 | return nil, ErrValueInvalidType |
| 278 | } |
| 279 | |
| 280 | return res, nil |
| 281 | } |
| 282 | |
| 283 | func AccountQuerierFromCtx(ctx context.Context) (types.AccountQuerier, error) { |
| 284 | val := ctx.Value(CtxKeyAccountQuerier) |
no outgoing calls
no test coverage detected