Search Options

Results per page
Sort
Preferred Languages
Advance

Results 91 - 100 of 345 for unmarshaler (0.16 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. internal/s3select/parquet/args.go

    import "encoding/xml"
    
    // ReaderArgs - represents elements inside <InputSerialization><Parquet/> in request XML.
    type ReaderArgs struct {
    	unmarshaled bool
    }
    
    // IsEmpty - returns whether reader args is empty or not.
    func (args *ReaderArgs) IsEmpty() bool {
    	return !args.unmarshaled
    }
    
    // UnmarshalXML - decodes XML data.
    func (args *ReaderArgs) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Tue Jun 01 21:59:40 UTC 2021
    - 1.4K bytes
    - Viewed (0)
  4. 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)
  5. istioctl/pkg/util/configdump/route.go

    		drc[i].RouteConfig.TypeUrl = v3.RouteType
    	}
    	sort.Slice(drc, func(i, j int) bool {
    		r := &route.RouteConfiguration{}
    		err = drc[i].RouteConfig.UnmarshalTo(r)
    		if err != nil {
    			return false
    		}
    		name := r.Name
    		err = drc[j].RouteConfig.UnmarshalTo(r)
    		if err != nil {
    			return false
    		}
    		return name < r.Name
    	})
    
    	// In Istio 1.5, it is not enough just to sort the routes.  The virtual hosts
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Nov 03 08:41:32 UTC 2022
    - 3.2K bytes
    - Viewed (0)
  6. staging/src/k8s.io/apiserver/pkg/admission/plugin/webhook/mutating/dispatcher_test.go

    			var p map[string]interface{}
    			if err := json.Unmarshal([]byte(actual), &p); err != nil {
    				t.Errorf("unexpected error unmarshaling patch annotation: %v", err)
    			}
    			if p["configuration"] != tc.config {
    				t.Errorf("unmarshaled configuration doesn't match, want: %s, got: %v", tc.config, p["configuration"])
    			}
    			if p["webhook"] != tc.webhook {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 28 08:48:22 UTC 2024
    - 4.3K bytes
    - Viewed (0)
  7. cmd/kubeadm/app/apis/bootstraptoken/v1/utils.go

    	// len(result) == 3
    	validatedSubstringsSize = 3
    )
    
    // MarshalJSON implements the json.Marshaler interface.
    func (bts BootstrapTokenString) MarshalJSON() ([]byte, error) {
    	return []byte(fmt.Sprintf(`"%s"`, bts.String())), nil
    }
    
    // UnmarshalJSON implements the json.Unmarshaller interface.
    func (bts *BootstrapTokenString) UnmarshalJSON(b []byte) error {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 26 15:51:39 UTC 2023
    - 8.3K bytes
    - Viewed (0)
  8. test/typeparam/issue48185b.dir/main.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package main
    
    import (
    	"./a"
    	"fmt"
    )
    
    func main() {
    	_ = a.UnmarshalOptions1{
    		Unmarshalers: a.UnmarshalFuncV2(func(opts a.UnmarshalOptions1, dec *a.Decoder1, val *interface{}) (err error) {
    			return fmt.Errorf("error")
    		}),
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 24 02:14:15 UTC 2022
    - 395 bytes
    - Viewed (0)
  9. istioctl/pkg/util/configdump/listener.go

    		dal[i].ActiveState.Listener.TypeUrl = v3.ListenerType
    	}
    	sort.Slice(dal, func(i, j int) bool {
    		l := &listener.Listener{}
    		err = dal[i].ActiveState.Listener.UnmarshalTo(l)
    		if err != nil {
    			return false
    		}
    		name := l.Name
    		err = dal[j].ActiveState.Listener.UnmarshalTo(l)
    		if err != nil {
    			return false
    		}
    		return name < l.Name
    	})
    	if stripVersions {
    		for i := range dal {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Nov 03 08:41:32 UTC 2022
    - 2.5K bytes
    - Viewed (0)
  10. istioctl/pkg/util/clusters/wrapper.go

    	*admin.Clusters
    }
    
    // MarshalJSON is a custom marshaller to handle protobuf pain
    func (w *Wrapper) MarshalJSON() ([]byte, error) {
    	return protomarshal.Marshal(w)
    }
    
    // UnmarshalJSON is a custom unmarshaller to handle protobuf pain
    func (w *Wrapper) UnmarshalJSON(b []byte) error {
    	cd := &admin.Clusters{}
    	err := protomarshal.UnmarshalAllowUnknown(b, cd)
    	*w = Wrapper{cd}
    	return err
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Nov 03 08:41:32 UTC 2022
    - 1.2K bytes
    - Viewed (0)
Back to top