Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 14 for ReturnTypes (0.66 sec)

  1. staging/src/k8s.io/apiserver/pkg/authentication/cel/interface.go

    	Expression string
    }
    
    // GetExpression returns the CEL expression.
    func (v *ClaimMappingExpression) GetExpression() string {
    	return v.Expression
    }
    
    // ReturnTypes returns the CEL expression return types.
    func (v *ClaimMappingExpression) ReturnTypes() []*celgo.Type {
    	// return types is only used for validation. The claims variable that's available
    	// to the claim mapping expressions is a map[string]interface{}, so we can't
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Mar 08 17:59:05 UTC 2024
    - 5.2K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apiserver/pkg/authorization/cel/compile.go

    	}
    	found := false
    	returnTypes := expressionAccessor.ReturnTypes()
    	for _, returnType := range returnTypes {
    		if ast.OutputType() == returnType {
    			found = true
    			break
    		}
    	}
    	if !found {
    		var reason string
    		if len(returnTypes) == 1 {
    			reason = fmt.Sprintf("must evaluate to %v but got %v", returnTypes[0].String(), ast.OutputType())
    		} else {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Nov 02 20:56:52 UTC 2023
    - 7.9K bytes
    - Viewed (0)
  3. staging/src/k8s.io/apiserver/pkg/authentication/cel/compile.go

    	}
    
    	found := false
    	returnTypes := expressionAccessor.ReturnTypes()
    	for _, returnType := range returnTypes {
    		if ast.OutputType() == returnType || cel.AnyType == returnType {
    			found = true
    			break
    		}
    	}
    	if !found {
    		var reason string
    		if len(returnTypes) == 1 {
    			reason = fmt.Sprintf("must evaluate to %v", returnTypes[0].String())
    		} else {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Mar 08 17:59:05 UTC 2024
    - 5.3K bytes
    - Viewed (0)
  4. staging/src/k8s.io/apiserver/pkg/authorization/cel/interface.go

    limitations under the License.
    */
    
    package cel
    
    import (
    	celgo "github.com/google/cel-go/cel"
    )
    
    type ExpressionAccessor interface {
    	GetExpression() string
    	ReturnTypes() []*celgo.Type
    }
    
    var _ ExpressionAccessor = &SubjectAccessReviewMatchCondition{}
    
    // SubjectAccessReviewMatchCondition is a CEL expression that maps a SubjectAccessReview request to a list of values.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Oct 31 04:48:00 UTC 2023
    - 1.2K bytes
    - Viewed (0)
  5. staging/src/k8s.io/apiserver/pkg/admission/plugin/policy/validating/interface.go

    }
    
    func (v *AuditAnnotationCondition) ReturnTypes() []*celgo.Type {
    	return []*celgo.Type{celgo.StringType, celgo.NullType}
    }
    
    // Variable is a named expression for composition.
    type Variable struct {
    	Name       string
    	Expression string
    }
    
    func (v *Variable) GetExpression() string {
    	return v.Expression
    }
    
    func (v *Variable) ReturnTypes() []*celgo.Type {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Feb 22 17:47:18 UTC 2024
    - 3K bytes
    - Viewed (0)
  6. staging/src/k8s.io/apiserver/pkg/admission/plugin/cel/compile.go

    	}
    	found := false
    	returnTypes := expressionAccessor.ReturnTypes()
    	for _, returnType := range returnTypes {
    		if ast.OutputType() == returnType || cel.AnyType == returnType {
    			found = true
    			break
    		}
    	}
    	if !found {
    		var reason string
    		if len(returnTypes) == 1 {
    			reason = fmt.Sprintf("must evaluate to %v", returnTypes[0].String())
    		} else {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri May 10 22:07:40 UTC 2024
    - 10.5K bytes
    - Viewed (0)
  7. staging/src/k8s.io/apiserver/pkg/admission/plugin/policy/validating/message.go

    type MessageExpressionCondition struct {
    	MessageExpression string
    }
    
    func (m *MessageExpressionCondition) GetExpression() string {
    	return m.MessageExpression
    }
    
    func (m *MessageExpressionCondition) ReturnTypes() []*celgo.Type {
    	return []*celgo.Type{celgo.StringType}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Feb 12 18:58:24 UTC 2024
    - 1K bytes
    - Viewed (0)
  8. testing/integ-test/src/integTest/groovy/org/gradle/integtests/MixInCoreTypesTransformingClassLoaderIntegrationTest.groovy

                class CustomTask extends DefaultTask {}
    
                class Assert {
                    static def returnTypesFor(Object object, String methodName, Class... returnTypes) {
                        assert object.getClass().methods.findAll { it.name == methodName }*.returnType.name.sort() == returnTypes*.name.sort()
                    }
                }
    
                task customTask(type: CustomTask) {
                    doFirst { task ->
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Apr 04 07:21:38 UTC 2024
    - 2.3K bytes
    - Viewed (0)
  9. staging/src/k8s.io/apiserver/pkg/admission/plugin/cel/compile_test.go

    	return v.Expression
    }
    
    func (v *fakeValidationCondition) ReturnTypes() []*celgo.Type {
    	return []*celgo.Type{celgo.BoolType}
    }
    
    type fakeAuditAnnotationCondition struct {
    	ValueExpression string
    }
    
    func (v *fakeAuditAnnotationCondition) GetExpression() string {
    	return v.ValueExpression
    }
    
    func (v *fakeAuditAnnotationCondition) ReturnTypes() []*celgo.Type {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri May 10 22:07:40 UTC 2024
    - 10.8K bytes
    - Viewed (0)
  10. staging/src/k8s.io/apiserver/pkg/admission/plugin/cel/composition_test.go

    )
    
    type testVariable struct {
    	name       string
    	expression string
    }
    
    func (t *testVariable) GetExpression() string {
    	return t.expression
    }
    
    func (t *testVariable) ReturnTypes() []*cel.Type {
    	return []*cel.Type{cel.AnyType}
    }
    
    func (t *testVariable) GetName() string {
    	return t.name
    }
    
    func TestCompositedPolicies(t *testing.T) {
    	cases := []struct {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri May 10 22:07:40 UTC 2024
    - 8.2K bytes
    - Viewed (0)
Back to top