Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 140 for Unmarshal (2.96 sec)

  1. 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)
  2. 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)
  3. 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)
  4. 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)
  5. cmd/utils_test.go

    	type jsonResult struct {
    		Method     string      `json:"method"`
    		RequestURI string      `json:"reqURI"`
    		Header     http.Header `json:"header"`
    	}
    	res := jsonResult{}
    	if err = json.Unmarshal([]byte(strings.ReplaceAll(jsonReq, "%%", "%")), &res); err != nil {
    		t.Fatal(err)
    	}
    
    	// Look for expected method.
    	if res.Method != http.MethodGet {
    		t.Fatalf("Unexpected method %s, expected 'GET'", res.Method)
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri Feb 23 21:28:14 GMT 2024
    - 10.2K bytes
    - Viewed (0)
  6. cmd/metacache-set.go

    		v, ok := fi.Metadata[partKey]
    		if !ok {
    			o.debugln("no match in metadata, waiting")
    			return -1, io.ErrUnexpectedEOF
    		}
    		err := json.Unmarshal([]byte(v), &tmp)
    		if !ok {
    			bugLogIf(context.Background(), err)
    			return -1, err
    		}
    		if tmp.First == "" && tmp.Last == "" && tmp.EOS {
    			return 0, errFileNotFound
    		}
    		if tmp.First >= search {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed May 01 17:59:08 GMT 2024
    - 30.4K bytes
    - Viewed (0)
  7. cmd/admin-handlers_test.go

    	if rec.Code != http.StatusOK {
    		t.Errorf("Expected to receive %d status code but received %d. Body (%s)",
    			http.StatusOK, rec.Code, string(resp))
    	}
    
    	result := &serviceResult{}
    	if err := json.Unmarshal(resp, result); err != nil {
    		t.Error(err)
    	}
    	_ = result
    
    	// Wait until testServiceSignalReceiver() called in a goroutine quits.
    	wg.Wait()
    }
    
    // Test for service restart management REST API.
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Feb 22 06:26:06 GMT 2024
    - 13.8K bytes
    - Viewed (0)
  8. cmd/admin-handlers-idp-ldap.go

    	if err != nil {
    		adminLogIf(ctx, err)
    		writeErrorResponseJSON(ctx, w, errorCodes.ToAPIErr(ErrAdminConfigBadJSON), r.URL)
    		return
    	}
    
    	var par madmin.PolicyAssociationReq
    	err = json.Unmarshal(reqBytes, &par)
    	if err != nil {
    		writeErrorResponseJSON(ctx, w, errorCodes.ToAPIErr(ErrInvalidRequest), r.URL)
    		return
    	}
    
    	if err := par.IsValid(); err != nil {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 25 15:50:16 GMT 2024
    - 13.3K bytes
    - Viewed (0)
  9. istioctl/pkg/multixds/gather.go

    			Component: "MISSING",
    			ID:        "MISSING",
    			Info: istioversion.BuildInfo{
    				Version: "MISSING CP ID",
    			},
    		}
    	}
    
    	cpID := pilotxds.IstioControlPlaneInstance{}
    	err := json.Unmarshal([]byte(xdsResponse.ControlPlane.Identifier), &cpID)
    	if err != nil {
    		return pilotxds.IstioControlPlaneInstance{
    			Component: "INVALID",
    			ID:        "INVALID",
    			Info: istioversion.BuildInfo{
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Fri Mar 08 08:38:19 GMT 2024
    - 13.6K bytes
    - Viewed (0)
  10. cni/pkg/plugin/plugin.go

    	conf := Config{}
    
    	if err := json.Unmarshal(stdin, &conf); err != nil {
    		return nil, fmt.Errorf("failed to parse network configuration: %v", err)
    	}
    
    	log.Debugf("istio-cni: Config is: %+v", conf)
    	// Parse previous result. Remove this if your plugin is not chained.
    	if conf.RawPrevResult != nil {
    		resultBytes, err := json.Marshal(conf.RawPrevResult)
    		if err != nil {
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Wed May 08 15:58:51 GMT 2024
    - 10.5K bytes
    - Viewed (0)
Back to top