Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 180 for unmarshalV (0.19 sec)

  1. cmd/xl-storage-format-v2-legacy.go

    package cmd
    
    import (
    	"fmt"
    	"time"
    
    	"github.com/tinylib/msgp/msgp"
    )
    
    // unmarshalV unmarshals with a specific header version.
    func (x *xlMetaV2VersionHeader) unmarshalV(v uint8, bts []byte) (o []byte, err error) {
    	switch v {
    	case 1:
    		return x.unmarshalV1(bts)
    	case 2:
    		x2 := xlMetaV2VersionHeaderV2{xlMetaV2VersionHeader: x}
    		return x2.UnmarshalMsg(bts)
    	case xlHeaderVersion:
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Fri Apr 19 16:43:43 GMT 2024
    - 5.7K bytes
    - Viewed (0)
  2. cmd/xl-storage-format-v2.go

    	}
    	return decodeVersions(buf, versions, func(i int, hdr, meta []byte) error {
    		ver := &x.versions[i]
    		_, err = ver.header.unmarshalV(headerV, hdr)
    		if err != nil {
    			return err
    		}
    		ver.meta = meta
    
    		// Fix inconsistent x-minio-internal-replication-timestamp by loading and reindexing.
    		if metaV < 2 && ver.header.Type == DeleteType {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Tue Apr 23 05:07:37 GMT 2024
    - 63.6K bytes
    - Viewed (1)
  3. cmd/xl-storage-format-v2_test.go

    		}
    		vers = append(vers, xl.versions)
    	}
    	for _, v2 := range vers {
    		for _, ver := range v2 {
    			b, _ := json.Marshal(ver.header)
    			t.Log(string(b))
    			var x xlMetaV2Version
    			_, _ = x.unmarshalV(0, ver.meta)
    			b, _ = json.Marshal(x)
    			t.Log(string(b), x.getSignature())
    		}
    	}
    
    	for i := range vers {
    		t.Run(fmt.Sprintf("non-strict-q%d", i), func(t *testing.T) {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Fri Mar 08 17:50:48 GMT 2024
    - 36.4K bytes
    - Viewed (0)
  4. cmd/batch-job-common-types.go

    type BatchJobSize int64
    
    // UnmarshalYAML to parse humanized byte values
    func (s *BatchJobSize) UnmarshalYAML(unmarshal func(interface{}) error) error {
    	var batchExpireSz string
    	err := unmarshal(&batchExpireSz)
    	if err != nil {
    		return err
    	}
    	sz, err := humanize.ParseBytes(batchExpireSz)
    	if err != nil {
    		return err
    	}
    	*s = BatchJobSize(sz)
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Feb 01 21:53:26 GMT 2024
    - 7.9K bytes
    - Viewed (0)
  5. istioctl/pkg/version/version.go

    			switch resource.TypeUrl {
    			case "type.googleapis.com/envoy.config.core.v3.Node":
    				node := core.Node{}
    				err := resource.UnmarshalTo(&node)
    				if err != nil {
    					return nil, fmt.Errorf("could not unmarshal Node: %w", err)
    				}
    				meta, err := model.ParseMetadata(node.Metadata)
    				if err != nil || meta.ProxyConfig == nil {
    					// Skip non-sidecars (e.g. istioctl queries)
    Go
    - Registered: Wed Apr 24 22:53:08 GMT 2024
    - Last Modified: Fri Mar 15 01:18:49 GMT 2024
    - 8.3K bytes
    - Viewed (0)
  6. 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 {
    Go
    - Registered: Wed Apr 24 22:53:08 GMT 2024
    - Last Modified: Sat Feb 25 04:09:53 GMT 2023
    - 2.2K bytes
    - Viewed (0)
  7. istioctl/pkg/writer/envoy/configdump/listener.go

    		if filter.Name == HTTPListener {
    			httpProxy := &hcm.HttpConnectionManager{}
    			// Allow Unmarshal to work even if Envoy and istioctl are different
    			filter.GetTypedConfig().TypeUrl = "type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager"
    			err := filter.GetTypedConfig().UnmarshalTo(httpProxy)
    			if err != nil {
    				return err.Error()
    			}
    			if httpProxy.GetRouteConfig() != nil {
    Go
    - Registered: Wed Apr 24 22:53:08 GMT 2024
    - Last Modified: Wed Nov 29 12:37:14 GMT 2023
    - 18.1K bytes
    - Viewed (0)
  8. internal/kms/dek_test.go

    			t.Fatalf("Test %d: failed to marshal DEK: %v", i, err)
    		}
    
    		var key DEK
    		if err = key.UnmarshalText(text); err != nil {
    			t.Fatalf("Test %d: failed to unmarshal DEK: %v", i, err)
    		}
    		if key.Plaintext != nil {
    			t.Fatalf("Test %d: unmarshaled DEK contains non-nil plaintext", i)
    		}
    		if !bytes.Equal(key.Ciphertext, test.Key.Ciphertext) {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Tue Jun 01 21:59:40 GMT 2021
    - 2.2K bytes
    - Viewed (0)
  9. cmd/batch-expire.go

    type BatchJobExpirePurge struct {
    	line, col      int
    	RetainVersions int `yaml:"retainVersions" json:"retainVersions"`
    }
    
    var _ yaml.Unmarshaler = &BatchJobExpirePurge{}
    
    // UnmarshalYAML - BatchJobExpirePurge extends unmarshal to extract line, col
    func (p *BatchJobExpirePurge) UnmarshalYAML(val *yaml.Node) error {
    	type purge BatchJobExpirePurge
    	var tmp purge
    	err := val.Decode(&tmp)
    	if err != nil {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 21K bytes
    - Viewed (1)
  10. istioctl/pkg/writer/pilot/status.go

    	for _, dr := range drs {
    		for _, resource := range dr.Resources {
    			clientConfig := xdsstatus.ClientConfig{}
    			err := resource.UnmarshalTo(&clientConfig)
    			if err != nil {
    				return nil, nil, fmt.Errorf("could not unmarshal ClientConfig: %w", err)
    			}
    			meta, err := model.ParseMetadata(clientConfig.GetNode().GetMetadata())
    			if err != nil {
    Go
    - Registered: Wed Apr 24 22:53:08 GMT 2024
    - Last Modified: Fri Mar 15 04:16:55 GMT 2024
    - 6.1K bytes
    - Viewed (0)
Back to top