Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 120 for Unmarshal (0.15 sec)

  1. common-protos/k8s.io/apimachinery/pkg/runtime/generated.proto

    //
    // 	{
    // 		"kind":"MyAPIObject",
    // 		"apiVersion":"v1",
    // 		"myPlugin": {
    // 			"kind":"PluginA",
    // 			"aOption":"foo",
    // 		},
    // 	}
    //
    // So what happens? Decode first uses json or yaml to unmarshal the serialized data into
    // your external MyAPIObject. That causes the raw JSON to be stored, but not unpacked.
    // The next step is to copy (using pkg/conversion) into the internal struct. The runtime
    Plain Text
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Mon Mar 11 18:43:24 GMT 2024
    - 4.2K bytes
    - Viewed (0)
  2. cmd/server-main.go

    	cfReader := bytes.NewReader(rd)
    
    	cv := config.ServerConfigVersion{}
    	if err = yaml.Unmarshal(rd, &cv); err != nil {
    		return err
    	}
    
    	switch cv.Version {
    	case "v1", "v2":
    	default:
    		return fmt.Errorf("unexpected version: %s", cv.Version)
    	}
    
    	cfCommon := config.ServerConfigCommon{}
    	if err = yaml.Unmarshal(rd, &cfCommon); err != nil {
    		return err
    	}
    
    	configCommonToSrvCtx(cfCommon, ctxt)
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri May 03 15:54:03 GMT 2024
    - 34.9K bytes
    - Viewed (1)
  3. internal/grid/handlers.go

    		},
    	}
    	return func() RT { return pool.Get().(RT) },
    		func(r RT) {
    			if r != rZero {
    				pool.Put(r)
    			}
    		}
    }
    
    // NewSingleHandler creates a typed handler that can provide Marshal/Unmarshal.
    // Use Register to register a server handler.
    // Use Call to initiate a clientside call.
    func NewSingleHandler[Req, Resp RoundTripper](h HandlerID, newReq func() Req, newResp func() Resp) *SingleHandler[Req, Resp] {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Apr 23 17:15:52 GMT 2024
    - 27.1K bytes
    - Viewed (0)
  4. cmd/object-handlers_test.go

    	if err != nil {
    		t.Fatalf("[%s] Failed to read NewMultipartUpload response <ERROR> %v", instanceType, err)
    	}
    	err = xml.Unmarshal(mpartRespBytes, &mpartResp)
    	if err != nil {
    		t.Fatalf("[%s] Failed to unmarshal NewMultipartUpload response <ERROR> %v", instanceType, err)
    	}
    
    	noAPIErr := APIError{}
    	missingDateHeaderErr := getAPIError(ErrMissingDateHeader)
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sun Apr 28 17:53:50 GMT 2024
    - 160K bytes
    - Viewed (0)
  5. internal/store/queuestore.go

    	eventData, err = os.ReadFile(filepath.Join(store.directory, key+store.fileExt))
    	if err != nil {
    		return item, err
    	}
    
    	if len(eventData) == 0 {
    		return item, os.ErrNotExist
    	}
    
    	if err = json.Unmarshal(eventData, &item); err != nil {
    		return item, err
    	}
    
    	return item, nil
    }
    
    // Del - Deletes an entry from the store.
    func (store *QueueStore[_]) Del(key string) error {
    	store.Lock()
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Mar 25 16:44:20 GMT 2024
    - 7.1K bytes
    - Viewed (0)
  6. cmd/format-erasure_test.go

    	}
    
    	b, err = os.ReadFile(pathJoin(rootPath, minioMetaBucket, formatConfigFile))
    	if err != nil {
    		t.Fatal(err)
    	}
    	formatV3 := &formatErasureV3{}
    	if err = json.Unmarshal(b, formatV3); err != nil {
    		t.Fatal(err)
    	}
    	if formatV3.Erasure.This != m.Erasure.Disk {
    		t.Fatalf("expected drive uuid: %s, got: %s", m.Erasure.Disk, formatV3.Erasure.This)
    	}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Apr 15 08:25:46 GMT 2024
    - 12.9K bytes
    - Viewed (0)
  7. internal/config/api/api.go

    func (sCfg *Config) UnmarshalJSON(data []byte) error {
    	type Alias Config
    	aux := &struct {
    		*Alias
    	}{
    		Alias: (*Alias)(sCfg),
    	}
    	return json.Unmarshal(data, &aux)
    }
    
    // LookupConfig - lookup api config and override with valid environment settings if any.
    func LookupConfig(kvs config.KVS) (cfg Config, err error) {
    	deprecatedKeys := []string{
    		apiReadyDeadline,
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Mar 28 01:08:07 GMT 2024
    - 11.1K bytes
    - Viewed (1)
  8. internal/config/storageclass/storage-class.go

    	type Alias Config
    	aux := &struct {
    		*Alias
    	}{
    		Alias: (*Alias)(sCfg),
    	}
    	return json.Unmarshal(data, &aux)
    }
    
    // IsValid - returns true if input string is a valid
    // storage class kind supported.
    func IsValid(sc string) bool {
    	return sc == RRS || sc == STANDARD
    }
    
    // UnmarshalText unmarshals storage class from its textual form into
    // storageClass structure.
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 11.8K bytes
    - Viewed (0)
  9. cmd/iam-etcd-store.go

    func getIAMConfig(item interface{}, data []byte, itemPath string) error {
    	data, err := decryptData(data, itemPath)
    	if err != nil {
    		return err
    	}
    	json := jsoniter.ConfigCompatibleWithStandardLibrary
    	return json.Unmarshal(data, item)
    }
    
    func (ies *IAMEtcdStore) loadIAMConfig(ctx context.Context, item interface{}, path string) error {
    	data, err := readKeyEtcd(ctx, ies.client, path)
    	if err != nil {
    		return err
    	}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 13.6K bytes
    - Viewed (0)
  10. cni/pkg/nodeagent/ztunnelserver.go

    		return nil, 0, fmt.Errorf("truncated message")
    	}
    	if flags&unix.MSG_CTRUNC != 0 {
    		return nil, 0, fmt.Errorf("truncated control message")
    	}
    	var resp T
    	var respPtr PT = &resp
    	err = proto.Unmarshal(buf[:n], respPtr)
    	if err != nil {
    		return nil, 0, err
    	}
    	return respPtr, oobn, nil
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Fri Apr 12 21:47:31 GMT 2024
    - 12.4K bytes
    - Viewed (0)
Back to top