(value any)
| 347 | type celTypeAdapter struct{} |
| 348 | |
| 349 | func (celTypeAdapter) NativeToValue(value any) ref.Val { |
| 350 | switch v := value.(type) { |
| 351 | case celHTTPRequest: |
| 352 | return v |
| 353 | case pkix.Name: |
| 354 | return celPkixName{&v} |
| 355 | case time.Time: |
| 356 | return types.Timestamp{Time: v} |
| 357 | case error: |
| 358 | return types.WrapErr(v) |
| 359 | } |
| 360 | return types.DefaultTypeAdapter.NativeToValue(value) |
| 361 | } |
| 362 | |
| 363 | // CELLibraryProducer provide CEL libraries that expose a Matcher |
| 364 | // implementation as a first class function within the CEL expression |
no test coverage detected