- Sort Score
- Result 10 results
- Languages All
Results 1 - 4 of 4 for NewTypeProviderAndEnvOption (0.31 sec)
-
staging/src/k8s.io/apiserver/pkg/cel/mutation/typeprovider.go
if ok { return t.Val(fields) } return p.underlyingTypeProvider.NewValue(structType, fields) } // NewTypeProviderAndEnvOption creates the TypeProvider with a given TypeResolver, // and also returns the CEL EnvOption to apply it to the env. func NewTypeProviderAndEnvOption(resolver common.TypeResolver) (*TypeProvider, cel.EnvOption) { tp := &TypeProvider{typeResolver: resolver}
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Apr 15 21:02:36 UTC 2024 - 3.7K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/cel/mutation/typeprovider_test.go
expression: "Object{spec: Object.spec{replicas: 3}}", expectedValue: map[string]any{"spec": map[string]any{"replicas": int64(3)}}, }, } { t.Run(tc.name, func(t *testing.T) { _, option := NewTypeProviderAndEnvOption(&mockTypeResolver{}) env := mustCreateEnv(t, option) ast, issues := env.Compile(tc.expression) if issues != nil { t.Fatalf("unexpected issues during compilation: %v", issues) }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Jan 24 00:01:35 UTC 2024 - 1.8K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/cel/mutation/unstructured/typeresolver_test.go
expression: "Object{spec: Object.spec{replicas: 3}} == Object{spec: Object.spec{replicas: 1 + 2}}", expectedValue: true, }, } { t.Run(tc.name, func(t *testing.T) { _, option := mutation.NewTypeProviderAndEnvOption(&TypeResolver{}) env := mustCreateEnv(t, option) ast, issues := env.Compile(tc.expression) if issues != nil { t.Fatalf("unexpected issues during compilation: %v", issues) }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri May 10 22:07:40 UTC 2024 - 3.9K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/cel/mutation/optional_test.go
// has marco supports only the dot access syntax. expression: `has({"foo": 1}.foo)`, expectedVal: celtypes.True, }, } { t.Run(tc.name, func(t *testing.T) { _, option := NewTypeProviderAndEnvOption(&mockTypeResolverForOptional{ mockTypeResolver: &mockTypeResolver{}, }) env := mustCreateEnvWithOptional(t, option) ast, issues := env.Compile(tc.expression) if issues != nil {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Jan 25 21:52:39 UTC 2024 - 4.9K bytes - Viewed (0)