Search Options

Results per page
Sort
Preferred Languages
Advance

Results 141 - 150 of 804 for unmarshalV1 (0.18 sec)

  1. staging/src/k8s.io/apimachinery/pkg/api/resource/quantity_proto_test.go

    	}
    	for _, testCase := range table2 {
    		q := Quantity{d: infDecAmount{testCase.dec}, Format: DecimalSI}
    		// Won't currently get an error as MarshalTo can't return one
    		result, _ := q.Marshal()
    		q.Unmarshal(result)
    		if q.Cmp(testCase.expect) != 0 {
    			t.Errorf("Expected: %v, Actual: %v", testCase.expect, q)
    		}
    	}
    }
    
    func TestQuantityProtoUnmarshal(t *testing.T) {
    	// Test when d is nil
    	table := []struct {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Apr 25 07:12:11 UTC 2017
    - 3.7K bytes
    - Viewed (0)
  2. pkg/credentialprovider/secrets/secrets.go

    			dockerConfigJSON := credentialprovider.DockerConfigJSON{}
    			if err := json.Unmarshal(dockerConfigJSONBytes, &dockerConfigJSON); err != nil {
    				return nil, err
    			}
    
    			passedCredentials = append(passedCredentials, dockerConfigJSON.Auths)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Mar 02 00:08:54 UTC 2021
    - 2.3K bytes
    - Viewed (0)
  3. pkg/kubelet/checkpointmanager/testing/example_checkpoint_formats/v1/types.go

    	cp.Checksum = checksum.New(*cp.Data)
    	return json.Marshal(*cp)
    }
    
    // UnmarshalCheckpoint tries to unmarshal the passed JSON data into CheckpointData.
    func (cp *CheckpointData) UnmarshalCheckpoint(blob []byte) error {
    	return json.Unmarshal(blob, cp)
    }
    
    // VerifyChecksum verifies that CheckpointData's checksum is same as the checksum calculated by its data.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Dec 19 03:53:33 UTC 2019
    - 1.9K bytes
    - Viewed (0)
  4. staging/src/k8s.io/apimachinery/pkg/util/managedfields/internal/lastappliedupdater_test.go

      selector:
        matchLabels:
          app: my-app
      template:
        metadata:
          labels:
            app: my-app
        spec:
          containers:
          - name: my-c
            image: my-image
    `)
    	if err := yaml.Unmarshal(appliedDeployment, &appliedObj.Object); err != nil {
    		t.Errorf("error decoding YAML: %v", err)
    	}
    
    	if err := f.Apply(appliedObj, "NOT-KUBECTL", false); err != nil {
    		t.Errorf("error applying object: %v", err)
    	}
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Mar 08 21:44:00 UTC 2023
    - 7.4K bytes
    - Viewed (0)
  5. tests/scanner_valuer_test.go

    	bytes, err := json.Marshal(l)
    	return string(bytes), err
    }
    
    func (l *StringsSlice) Scan(input interface{}) error {
    	switch value := input.(type) {
    	case string:
    		return json.Unmarshal([]byte(value), l)
    	case []byte:
    		return json.Unmarshal(value, l)
    	default:
    		return errors.New("not supported")
    	}
    }
    
    type ExampleStruct struct {
    	Name string
    	Val  string
    }
    
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Wed Jun 07 07:02:07 UTC 2023
    - 10.6K bytes
    - Viewed (0)
  6. staging/src/k8s.io/api/storage/v1beta1/generated.pb.go

    func (*CSIDriver) ProtoMessage() {}
    func (*CSIDriver) Descriptor() ([]byte, []int) {
    	return fileDescriptor_73e4f72503e71065, []int{0}
    }
    func (m *CSIDriver) XXX_Unmarshal(b []byte) error {
    	return m.Unmarshal(b)
    }
    func (m *CSIDriver) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
    	b = b[:cap(b)]
    	n, err := m.MarshalToSizedBuffer(b)
    	if err != nil {
    		return nil, err
    	}
    	return b[:n], nil
    }
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Mar 01 06:06:37 UTC 2024
    - 133.9K bytes
    - Viewed (0)
  7. staging/src/k8s.io/api/flowcontrol/v1beta2/generated.pb.go

    func (*ExemptPriorityLevelConfiguration) Descriptor() ([]byte, []int) {
    	return fileDescriptor_2e620af2eea53237, []int{0}
    }
    func (m *ExemptPriorityLevelConfiguration) XXX_Unmarshal(b []byte) error {
    	return m.Unmarshal(b)
    }
    func (m *ExemptPriorityLevelConfiguration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
    	b = b[:cap(b)]
    	n, err := m.MarshalToSizedBuffer(b)
    	if err != nil {
    		return nil, err
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Mar 01 06:06:37 UTC 2024
    - 142K bytes
    - Viewed (0)
  8. schema/serializer.go

    		var bytes []byte
    		switch v := dbValue.(type) {
    		case []byte:
    			bytes = v
    		case string:
    			bytes = []byte(v)
    		default:
    			return fmt.Errorf("failed to unmarshal JSONB value: %#v", dbValue)
    		}
    
    		if len(bytes) > 0 {
    			err = json.Unmarshal(bytes, fieldValue.Interface())
    		}
    	}
    
    	field.ReflectValueOf(ctx, dst).Set(fieldValue.Elem())
    	return
    }
    
    // Value implements serializer interface
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Mon Mar 18 08:28:46 UTC 2024
    - 4.6K bytes
    - Viewed (0)
  9. pkg/kubelet/status/state/checkpoint.go

    	prc.Checksum = 0
    	prc.Checksum = checksum.New(prc)
    	return json.Marshal(*prc)
    }
    
    // UnmarshalCheckpoint tries to unmarshal passed bytes to checkpoint
    func (prc *PodResourceAllocationCheckpoint) UnmarshalCheckpoint(blob []byte) error {
    	return json.Unmarshal(blob, prc)
    }
    
    // VerifyChecksum verifies that current checksum of checkpoint is valid
    func (prc *PodResourceAllocationCheckpoint) VerifyChecksum() error {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Feb 24 18:21:21 UTC 2023
    - 2.3K bytes
    - Viewed (0)
  10. staging/src/k8s.io/apimachinery/pkg/runtime/serializer/yaml/meta.go

    // encoding of an object, or an error.
    func (SimpleMetaFactory) Interpret(data []byte) (*schema.GroupVersionKind, error) {
    	gvk := runtime.TypeMeta{}
    	if err := yaml.Unmarshal(data, &gvk); err != nil {
    		return nil, fmt.Errorf("could not interpret GroupVersionKind; unmarshal error: %v", err)
    	}
    	gv, err := schema.ParseGroupVersion(gvk.APIVersion)
    	if err != nil {
    		return nil, err
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Nov 27 09:44:59 UTC 2019
    - 1.8K bytes
    - Viewed (0)
Back to top