Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 147 for Marshal (0.27 sec)

  1. internal/config/subnet/subnet.go

    	if !c.Registered() {
    		return "", errors.New("Deployment is not registered with SUBNET. Please register the deployment via 'mc license register ALIAS'")
    	}
    	body, err := json.Marshal(payload)
    	if err != nil {
    		return "", err
    	}
    	r, err := http.NewRequest(http.MethodPost, reqURL, bytes.NewReader(body))
    	if err != nil {
    		return "", err
    	}
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Feb 27 16:35:36 GMT 2023
    - 2.9K bytes
    - Viewed (0)
  2. internal/bucket/versioning/versioning_test.go

    func TestMarshalXML(t *testing.T) {
    	// Validates if Versioning with no excluded prefixes omits
    	// ExcludedPrefixes tags
    	v := Versioning{
    		Status: Enabled,
    	}
    	buf, err := xml.Marshal(v)
    	if err != nil {
    		t.Fatalf("Failed to marshal %v: %v", v, err)
    	}
    
    	str := string(buf)
    	if strings.Contains(str, "ExcludedPrefixes") {
    		t.Fatalf("XML shouldn't contain ExcludedPrefixes tag - %s", str)
    	}
    }
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sun May 08 05:06:44 GMT 2022
    - 8.8K bytes
    - Viewed (0)
  3. istioctl/pkg/waypoint/waypoint.go

    		RunE: func(cmd *cobra.Command, args []string) error {
    			gw, err := makeGateway(false)
    			if err != nil {
    				return fmt.Errorf("failed to create gateway: %v", err)
    			}
    			b, err := yaml.Marshal(gw)
    			if err != nil {
    				return err
    			}
    			// strip junk
    			res := strings.ReplaceAll(string(b), `  creationTimestamp: null
    `, "")
    			res = strings.ReplaceAll(res, `status: {}
    `, "")
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Wed May 01 16:16:40 GMT 2024
    - 15.2K bytes
    - Viewed (0)
  4. cmd/api-datatypes.go

    	DeleteMarkerMTime DeleteMarkerMTime `xml:"-"`
    	// MinIO extensions to support delete marker replication
    	ReplicationState ReplicationState `xml:"-"`
    }
    
    // DeleteMarkerMTime is an embedded type containing time.Time for XML marshal
    type DeleteMarkerMTime struct {
    	time.Time
    }
    
    // MarshalXML encodes expiration date if it is non-zero and encodes
    // empty string otherwise
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Jan 03 09:28:52 GMT 2022
    - 3K bytes
    - Viewed (0)
  5. cmd/config-migrate.go

    	for _, cfgFile := range configFiles {
    		if _, err = Load(cfgFile, cfg); err != nil {
    			if !osIsNotExist(err) && !osIsPermission(err) {
    				return nil, err
    			}
    			continue
    		}
    		data, _ = json.Marshal(cfg)
    		break
    	}
    	if osIsPermission(err) {
    		logger.Info("Older config found but is not readable %s, proceeding to read config from other places", err)
    	}
    	if osIsNotExist(err) || osIsPermission(err) || len(data) == 0 {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed Oct 18 18:05:24 GMT 2023
    - 5.4K bytes
    - Viewed (0)
  6. istioctl/pkg/writer/ztunnel/configdump/certificates.go

    		return fmt.Errorf("config writer has not been primed")
    	}
    	secretDump := c.ztunnelDump.Certificates
    	out, err := json.MarshalIndent(secretDump, "", "    ")
    	if err != nil {
    		return fmt.Errorf("failed to marshal secrets dump: %v", err)
    	}
    	if outputFormat == "yaml" {
    		if out, err = yaml.JSONToYAML(out); err != nil {
    			return err
    		}
    	}
    	fmt.Fprintln(c.Stdout, string(out))
    	return nil
    }
    
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Thu Apr 25 16:38:16 GMT 2024
    - 3.2K bytes
    - Viewed (0)
  7. istioctl/pkg/validate/validate.go

    		},
    		Spec: data,
    	}, nil
    }
    
    // TODO(nmittler): Remove this once Pilot migrates to galley schema.
    func fromSchemaAndJSONMap(schema resource.Schema, data any) (config.Spec, error) {
    	// Marshal to json bytes
    	str, err := json.Marshal(data)
    	if err != nil {
    		return nil, err
    	}
    	out, err := schema.NewInstance()
    	if err != nil {
    		return nil, err
    	}
    	if err = config.ApplyJSONStrict(out, string(str)); err != nil {
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Mon Jan 22 17:58:52 GMT 2024
    - 15K bytes
    - Viewed (0)
  8. docs/debugging/xl-meta/main.go

    						if err != nil {
    							return err
    						}
    						// Quote string...
    						b, _ := json.Marshal(file.Name)
    						b2, err := decode(r, file.Name)
    						if err != nil {
    							return err
    						}
    						var tmp map[string]interface{}
    						if err := json.Unmarshal(b2, &tmp); err == nil {
    							if b3, err := json.Marshal(tmp); err == nil {
    								b2 = b3
    							}
    						}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed Apr 24 17:56:22 GMT 2024
    - 20.2K bytes
    - Viewed (1)
  9. istioctl/pkg/writer/ztunnel/configdump/workload.go

    		if filter.Verify(workload) {
    			filteredWorkloads = append(filteredWorkloads, workload)
    		}
    	}
    	out, err := json.MarshalIndent(filteredWorkloads, "", "    ")
    	if err != nil {
    		return fmt.Errorf("failed to marshal workloads: %v", err)
    	}
    	if outputFormat == "yaml" {
    		if out, err = yaml.JSONToYAML(out); err != nil {
    			return err
    		}
    	}
    	fmt.Fprintln(c.Stdout, string(out))
    	return nil
    }
    
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Tue Apr 23 21:30:30 GMT 2024
    - 4K bytes
    - Viewed (0)
  10. schema/serializer.go

    	return
    }
    
    // Value implements serializer interface
    func (JSONSerializer) Value(ctx context.Context, field *Field, dst reflect.Value, fieldValue interface{}) (interface{}, error) {
    	result, err := json.Marshal(fieldValue)
    	if string(result) == "null" {
    		if field.TagSettings["NOT NULL"] != "" {
    			return "", nil
    		}
    		return nil, err
    	}
    	return string(result), err
    }
    
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Mon Mar 18 08:28:46 GMT 2024
    - 4.6K bytes
    - Viewed (0)
Back to top