Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for NewFieldType (2.46 sec)

  1. staging/src/k8s.io/apiserver/pkg/cel/mutation/unstructured/fieldtype.go

    limitations under the License.
    */
    
    package unstructured
    
    import (
    	"fmt"
    
    	"github.com/google/cel-go/common/types"
    )
    
    // NewFieldType creates a field by its field name.
    // This version of FieldType is unstructured and has DynType as its type.
    func NewFieldType(name string) *types.FieldType {
    	return &types.FieldType{
    		// for unstructured, we do not check for its type,
    		// use DynType for all fields.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jan 24 00:01:35 UTC 2024
    - 1.2K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apiserver/pkg/cel/mutation/unstructured/typeref.go

    // Field looks up the field by name.
    // This is the unstructured version that allows any name as the field name.
    // The returned field is of DynType type.
    func (r *TypeRef) Field(name string) (*types.FieldType, bool) {
    	return NewFieldType(name), true
    }
    
    // NewTypeRef creates a TypeRef by the given field name.
    func NewTypeRef(name string) *TypeRef {
    	objectType := types.NewObjectType(name, common.ObjectTraits)
    	return &TypeRef{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jan 24 00:01:35 UTC 2024
    - 1.9K bytes
    - Viewed (0)
  3. schema/field.go

    								field.TagSettings[key] = value
    							}
    						}
    					}
    
    					for i := 0; i < rvType.NumField(); i++ {
    						newFieldType := rvType.Field(i).Type
    						for newFieldType.Kind() == reflect.Ptr {
    							newFieldType = newFieldType.Elem()
    						}
    
    						fieldValue = reflect.New(newFieldType)
    						if rvType != reflect.Indirect(fieldValue).Type() {
    							getRealFieldValue(fieldValue)
    						}
    
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Mon Apr 15 03:20:20 UTC 2024
    - 32K bytes
    - Viewed (0)
Back to top