Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 804 for unmarshalV1 (0.22 sec)

  1. pilot/test/xdstest/extract.go

    	dst := any(new(T)).(proto.Message)
    	if err := a.UnmarshalTo(dst); err != nil {
    		var z *T
    		return z
    	}
    	return any(dst).(*T)
    }
    
    func UnmarshalAny[T any](t test.Failer, a *anypb.Any) *T {
    	dst := any(new(T)).(proto.Message)
    	if err := a.UnmarshalTo(dst); err != nil {
    		t.Fatalf("failed to unmarshal to %T: %v", dst, err)
    	}
    	return any(dst).(*T)
    }
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Dec 19 22:42:42 UTC 2023
    - 13.9K bytes
    - Viewed (0)
  2. istioctl/pkg/util/configdump/secret.go

    	secretDump := &admin.SecretsConfigDump{}
    	err = secretDumpAny.UnmarshalTo(secretDump)
    	if err != nil {
    		return nil, err
    	}
    	return secretDump, nil
    }
    
    // GetRootCAFromSecretConfigDump retrieves root CA from a secret config dump wrapper
    func (w *Wrapper) GetRootCAFromSecretConfigDump(anySec *anypb.Any) (string, error) {
    	var secret extapi.Secret
    	if err := anySec.UnmarshalTo(&secret); err != nil {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Sat Feb 25 04:09:53 UTC 2023
    - 2.2K bytes
    - Viewed (0)
  3. src/internal/fuzz/encoding_test.go

    		if b2 != b1 {
    			t.Fatalf("unmarshaled %v, want %v:\n%s", b2, b1, buf)
    		}
    	}
    }
    
    func TestInt8RoundTrip(t *testing.T) {
    	for x := -128; x < 128; x++ {
    		i1 := int8(x)
    		buf := marshalCorpusFile(i1)
    		vs, err := unmarshalCorpusFile(buf)
    		if err != nil {
    			t.Fatal(err)
    		}
    		i2 := vs[0].(int8)
    		if i2 != i1 {
    			t.Fatalf("unmarshaled %v, want %v:\n%s", i2, i1, buf)
    		}
    	}
    }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 07 00:20:34 UTC 2024
    - 8.2K bytes
    - Viewed (0)
  4. operator/pkg/apis/istio/v1alpha1/value_types_json.go

    	if value[0] == '"' {
    		this.Type = int64(intstr.String)
    		var s string
    		err := json.Unmarshal(value, &s)
    		if err != nil {
    			return err
    		}
    		this.StrVal = &wrapperspb.StringValue{Value: s}
    		return nil
    	}
    	this.Type = int64(intstr.Int)
    	var s int32
    	err := json.Unmarshal(value, &s)
    	if err != nil {
    		return err
    	}
    	this.IntVal = &wrapperspb.Int32Value{Value: s}
    	return nil
    }
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Sun Apr 21 17:42:54 UTC 2024
    - 2.2K bytes
    - Viewed (0)
  5. pkg/apis/core/json.go

    var _ = json.Marshaler(&AvoidPods{})
    var _ = json.Unmarshaler(&AvoidPods{})
    
    // MarshalJSON panics to prevent marshalling of internal structs
    func (AvoidPods) MarshalJSON() ([]byte, error) { panic("do not marshal internal struct") }
    
    // UnmarshalJSON panics to prevent unmarshalling of internal structs
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Sep 25 18:06:51 UTC 2019
    - 1.2K bytes
    - Viewed (0)
  6. src/encoding/asn1/asn1_test.go

    	}
    
    	unmarshaled := RawValue{}
    	if _, err := Unmarshal(NullBytes, &unmarshaled); err != nil {
    		t.Fatal(err)
    	}
    
    	unmarshaled.FullBytes = NullRawValue.FullBytes
    	if len(unmarshaled.Bytes) == 0 {
    		// DeepEqual considers a nil slice and an empty slice to be different.
    		unmarshaled.Bytes = NullRawValue.Bytes
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Mar 29 18:24:36 UTC 2023
    - 43.6K bytes
    - Viewed (0)
  7. staging/src/k8s.io/apimachinery/pkg/api/resource/quantity_proto.go

    	n += 1 + l + sovGenerated(uint64(l))
    	return n
    }
    
    func sovGenerated(x uint64) (n int) {
    	return (bits.Len64(x|1) + 6) / 7
    }
    
    // Unmarshal is a customized version of the generated Protobuf unmarshaler for a struct
    // with a single string field.
    func (m *Quantity) Unmarshal(data []byte) error {
    	l := len(data)
    	iNdEx := 0
    	for iNdEx < l {
    		preIndex := iNdEx
    		var wire uint64
    		for shift := uint(0); ; shift += 7 {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 21 05:31:33 UTC 2021
    - 6K bytes
    - Viewed (0)
  8. operator/pkg/version/version.go

    	if v.Suffix == "" {
    		return v.PatchVersion.String()
    	}
    	return fmt.Sprintf("%s-%s", v.PatchVersion, v.Suffix)
    }
    
    // UnmarshalYAML implements the Unmarshaler interface.
    func (v *Version) UnmarshalYAML(unmarshal func(any) error) error {
    	s := ""
    	if err := unmarshal(&s); err != nil {
    		return err
    	}
    	out, err := NewVersionFromString(s)
    	if err != nil {
    		return err
    	}
    	*v = *out
    	return nil
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Aug 29 14:15:26 UTC 2023
    - 4.4K bytes
    - Viewed (0)
  9. src/cmd/go/internal/modinfo/info.go

    // UnmarshalJSON accepts both {"Err":"text"} and "text",
    // so that the output of go mod download -json can still
    // be unmarshaled into a ModulePublic during -reuse processing.
    func (e *ModuleError) UnmarshalJSON(data []byte) error {
    	if len(data) > 0 && data[0] == '"' {
    		return json.Unmarshal(data, &e.Err)
    	}
    	return json.Unmarshal(data, (*moduleErrorNoMethods)(e))
    }
    
    func (m *ModulePublic) String() string {
    	s := m.Path
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 26 19:58:28 UTC 2024
    - 3.1K bytes
    - Viewed (0)
  10. pkg/wasm/convert.go

    		if err := ec.GetTypedConfig().UnmarshalTo(wasmHTTPFilterConfig); err != nil {
    			return nil, nil, nil, fmt.Errorf("failed to unmarshal extension config resource into Wasm HTTP filter: %w", err)
    		}
    	case ec.GetTypedConfig().TypeUrl == model.WasmNetworkFilterType:
    		wasmNetwork = true
    		if err := ec.GetTypedConfig().UnmarshalTo(wasmNetworkFilterConfig); err != nil {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Apr 17 20:06:41 UTC 2024
    - 13.3K bytes
    - Viewed (0)
Back to top