Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 345 for unmarshaler (0.18 sec)

  1. pkg/util/protomarshal/protomarshal.go

    	"istio.io/istio/pkg/log"
    )
    
    var (
    	unmarshaler       = jsonpb.Unmarshaler{AllowUnknownFields: true}
    	strictUnmarshaler = jsonpb.Unmarshaler{}
    )
    
    func Unmarshal(b []byte, m proto.Message) error {
    	return strictUnmarshaler.Unmarshal(bytes.NewReader(b), legacyproto.MessageV1(m))
    }
    
    func UnmarshalString(s string, m proto.Message) error {
    	return Unmarshal([]byte(s), m)
    }
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Mar 12 10:02:09 UTC 2024
    - 6.6K bytes
    - Viewed (0)
  2. src/hash/example_test.go

    	)
    
    	first := sha256.New()
    	first.Write([]byte(input1))
    
    	marshaler, ok := first.(encoding.BinaryMarshaler)
    	if !ok {
    		log.Fatal("first does not implement encoding.BinaryMarshaler")
    	}
    	state, err := marshaler.MarshalBinary()
    	if err != nil {
    		log.Fatal("unable to marshal hash:", err)
    	}
    
    	second := sha256.New()
    
    	unmarshaler, ok := second.(encoding.BinaryUnmarshaler)
    	if !ok {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat Nov 04 03:47:34 UTC 2017
    - 1.2K bytes
    - Viewed (0)
  3. pkg/util/gogoprotomarshal/protomarshal.go

    		reader.Reset(js)
    		return m.Unmarshal(reader, pb)
    	}
    	return nil
    }
    
    // ApplyJSONStrict unmarshals a JSON string into a proto message.
    func ApplyJSONStrict(js string, pb proto.Message) error {
    	reader := strings.NewReader(js)
    	m := jsonpb.Unmarshaler{}
    	return m.Unmarshal(reader, pb)
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue May 23 17:08:31 UTC 2023
    - 1.4K bytes
    - Viewed (0)
  4. src/encoding/xml/read.go

    //     unmarshal maps the sub-element to that struct field.
    //
    //   - An anonymous struct field is handled as if the fields of its
    //     value were part of the outer struct.
    //
    //   - A struct field with tag "-" is never unmarshaled into.
    //
    // If Unmarshal encounters a field type that implements the Unmarshaler
    // interface, Unmarshal calls its UnmarshalXML method to produce the value from
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 08 19:04:28 UTC 2023
    - 22.4K bytes
    - Viewed (0)
  5. src/cmd/cgo/internal/testplugin/testdata/issue18676/main.go

    //  2. The plugin adds that same itab again.  That makes a cycle in the itab
    //     chain rooted at hash bucket 0x111.
    //  3. The main binary then asks for the itab for *dynamodbstreamsevt.Event /
    //     json.Unmarshaler.  This itab happens to also live in bucket 0x111.
    //     The lookup code goes into an infinite loop searching for this itab.
    //
    // The code is carefully crafted so that the two itabs are both from the
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 12 11:59:56 UTC 2023
    - 1.1K bytes
    - Viewed (0)
  6. cmd/object-api-interface_gen.go

    	return
    }
    
    // MarshalMsg implements msgp.Marshaler
    func (z ExpirationOptions) MarshalMsg(b []byte) (o []byte, err error) {
    	o = msgp.Require(b, z.Msgsize())
    	// map header, size 1
    	// string "Expire"
    	o = append(o, 0x81, 0xa6, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65)
    	o = msgp.AppendBool(o, z.Expire)
    	return
    }
    
    // UnmarshalMsg implements msgp.Unmarshaler
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri Mar 08 19:08:18 UTC 2024
    - 8.1K bytes
    - Viewed (0)
  7. internal/bucket/replication/datatypes_gen.go

    	if err != nil {
    		err = msgp.WrapError(err)
    		return
    	}
    	return
    }
    
    // MarshalMsg implements msgp.Marshaler
    func (z StatusType) MarshalMsg(b []byte) (o []byte, err error) {
    	o = msgp.Require(b, z.Msgsize())
    	o = msgp.AppendString(o, string(z))
    	return
    }
    
    // UnmarshalMsg implements msgp.Unmarshaler
    func (z *StatusType) UnmarshalMsg(bts []byte) (o []byte, err error) {
    	{
    		var zb0001 string
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri Mar 08 19:08:18 UTC 2024
    - 2.3K bytes
    - Viewed (0)
  8. cmd/metrics-v2_gen.go

    	return
    }
    
    // MarshalMsg implements msgp.Marshaler
    func (z MetricName) MarshalMsg(b []byte) (o []byte, err error) {
    	o = msgp.Require(b, z.Msgsize())
    	o = msgp.AppendString(o, string(z))
    	return
    }
    
    // UnmarshalMsg implements msgp.Unmarshaler
    func (z *MetricName) UnmarshalMsg(bts []byte) (o []byte, err error) {
    	{
    		var zb0001 string
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Sun Mar 10 09:15:15 UTC 2024
    - 19.2K bytes
    - Viewed (0)
  9. 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)
  10. test/typeparam/issue48185b.dir/a.go

    	fncVals  []typedArshaler[Options, Coder]
    	fncCache sync.Map // map[reflect.Type]unmarshaler
    }
    type typedArshaler[Options, Coder any] struct {
    	typ reflect.Type
    	fnc func(Options, *Coder, addressableValue) error
    }
    
    type UnmarshalOptions1 struct {
    	// Unmarshalers is a list of type-specific unmarshalers to use.
    	Unmarshalers *arshalers[UnmarshalOptions1, Decoder1]
    }
    
    type Decoder1 struct {
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Sep 07 20:37:05 UTC 2021
    - 1K bytes
    - Viewed (0)
Back to top