Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for MarshalQueryParameter (0.18 sec)

  1. staging/src/k8s.io/apimachinery/pkg/conversion/queryparams/convert.go

    	}
    
    	// Don't invoke functions on nil pointers
    	// If the type implements MarshalQueryParameter, AND the tag is not omitempty, AND the value is a nil pointer, "" seems like a reasonable response
    	if isPointerKind(value.Kind()) && zeroValue(value) {
    		return reflect.ValueOf(""), true
    	}
    
    	// Get the custom marshalled value
    	v, err := marshaler.MarshalQueryParameter()
    	if err != nil {
    		return reflect.Value{}, false
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Jun 25 16:23:43 UTC 2022
    - 4.9K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/time.go

    // the OpenAPI spec of this type.
    func (_ Time) OpenAPISchemaFormat() string { return "date-time" }
    
    // MarshalQueryParameter converts to a URL query parameter value
    func (t Time) MarshalQueryParameter() (string, error) {
    	if t.IsZero() {
    		// Encode unset/nil objects as an empty string
    		return "", nil
    	}
    
    	return t.UTC().Format(time.RFC3339), nil
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 29 21:48:09 UTC 2024
    - 5.2K bytes
    - Viewed (0)
  3. staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/micro_time.go

    // the OpenAPI spec of this type.
    func (_ MicroTime) OpenAPISchemaFormat() string { return "date-time" }
    
    // MarshalQueryParameter converts to a URL query parameter value
    func (t MicroTime) MarshalQueryParameter() (string, error) {
    	if t.IsZero() {
    		// Encode unset/nil objects as an empty string
    		return "", nil
    	}
    
    	return t.UTC().Format(RFC3339Micro), nil
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 29 21:48:10 UTC 2024
    - 5.2K bytes
    - Viewed (0)
  4. staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/unstructured.go

    	timestamp.UnmarshalQueryParameter(getNestedString(u.Object, "metadata", "creationTimestamp"))
    	return timestamp
    }
    
    func (u *Unstructured) SetCreationTimestamp(timestamp metav1.Time) {
    	ts, _ := timestamp.MarshalQueryParameter()
    	if len(ts) == 0 || timestamp.Time.IsZero() {
    		RemoveNestedField(u.Object, "metadata", "creationTimestamp")
    		return
    	}
    	u.setNestedField(ts, "metadata", "creationTimestamp")
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sun May 28 03:26:35 UTC 2023
    - 13.7K bytes
    - Viewed (0)
Back to top