Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 125 for Unmarshal (0.14 sec)

  1. internal/bucket/lifecycle/transition.go

    	errTransitionDateNotMidnight = Errorf("'Date' must be at midnight GMT")
    )
    
    // TransitionDate is a embedded type containing time.Time to unmarshal
    // Date in Transition
    type TransitionDate struct {
    	time.Time
    }
    
    // UnmarshalXML parses date from Transition and validates date format
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Jan 10 17:07:49 GMT 2022
    - 5.1K bytes
    - Viewed (0)
  2. cmd/bucket-policy.go

    	}
    
    	data, err := json.Marshal(bucketPolicy)
    	if err != nil {
    		// This should not happen because bucketPolicy is valid to convert to JSON data.
    		return nil, err
    	}
    
    	var policyInfo miniogopolicy.BucketAccessPolicy
    	json := jsoniter.ConfigCompatibleWithStandardLibrary
    	if err = json.Unmarshal(data, &policyInfo); err != nil {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 8K bytes
    - Viewed (0)
  3. internal/kms/dek_test.go

    	for i, test := range dekEncodeDecodeTests {
    		text, err := test.Key.MarshalText()
    		if err != nil {
    			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)
    		}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Jun 01 21:59:40 GMT 2021
    - 2.2K bytes
    - Viewed (0)
  4. internal/config/bool-flag.go

    }
    
    // MarshalJSON - converts BoolFlag into JSON data.
    func (bf BoolFlag) MarshalJSON() ([]byte, error) {
    	return json.Marshal(bf.String())
    }
    
    // UnmarshalJSON - parses given data into BoolFlag.
    func (bf *BoolFlag) UnmarshalJSON(data []byte) (err error) {
    	var s string
    	if err = json.Unmarshal(data, &s); err == nil {
    		b := BoolFlag(true)
    		if s == "" {
    			// Empty string is treated as valid.
    			*bf = b
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 07 15:10:40 GMT 2022
    - 2.3K bytes
    - Viewed (0)
  5. internal/crypto/sse-kms.go

    		b, err := base64.StdEncoding.DecodeString(context[0])
    		if err != nil {
    			return "", nil, err
    		}
    
    		json := jsoniter.ConfigCompatibleWithStandardLibrary
    		if err := json.Unmarshal(b, &ctx); err != nil {
    			return "", nil, err
    		}
    	}
    
    	keyID := h.Get(xhttp.AmzServerSideEncryptionKmsID)
    	spaces := strings.HasPrefix(keyID, " ") || strings.HasSuffix(keyID, " ")
    	if spaces {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 8.4K bytes
    - Viewed (0)
  6. docs/iam/access-manager-plugin.go

    		return
    	}
    
    	var out bytes.Buffer
    	json.Indent(&out, body, "", "  ")
    	fmt.Printf("Received JSON payload:\n%s\n", out.String())
    
    	reqMap := make(map[string]interface{})
    	err = json.Unmarshal(body, &reqMap)
    	if err != nil {
    		writeErrorResponse(w, err)
    		return
    	}
    
    	m := reqMap["input"].(map[string]interface{})
    	accountValue := m["account"].(string)
    	actionValue := m["action"].(string)
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Feb 08 17:15:20 GMT 2024
    - 2.7K bytes
    - Viewed (0)
  7. 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 {
    		return err
    	}
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 21K bytes
    - Viewed (1)
  8. cmd/data-usage.go

    			}
    			return DataUsageInfo{}, toObjectErr(err, minioMetaBucket, dataUsageObjNamePath)
    		}
    	}
    
    	var dataUsageInfo DataUsageInfo
    	json := jsoniter.ConfigCompatibleWithStandardLibrary
    	if err = json.Unmarshal(buf, &dataUsageInfo); err != nil {
    		return DataUsageInfo{}, err
    	}
    	// For forward compatibility reasons, we need to add this code.
    	if len(dataUsageInfo.BucketsUsage) == 0 {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 5.6K bytes
    - Viewed (0)
  9. internal/config/crypto.go

    		metadata       encryptedObject
    	)
    	if _, err := io.ReadFull(ciphertext, metadataBuffer); err != nil {
    		return nil, err
    	}
    	json := jsoniter.ConfigCompatibleWithStandardLibrary
    	if err := json.Unmarshal(metadataBuffer, &metadata); err != nil {
    		return nil, err
    	}
    	if fips.Enabled && metadata.Algorithm != sio.AES_256_GCM {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Mar 06 16:56:10 GMT 2023
    - 4.8K bytes
    - Viewed (0)
  10. internal/kms/kms.go

    	type JSON struct {
    		KeyID      string `json:"keyid"`
    		Ciphertext []byte `json:"ciphertext"`
    	}
    	var v JSON
    	json := jsoniter.ConfigCompatibleWithStandardLibrary
    	if err := json.Unmarshal(text, &v); err != nil {
    		return err
    	}
    	d.KeyID, d.Plaintext, d.Ciphertext = v.KeyID, nil, v.Ciphertext
    	return nil
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri Mar 01 21:09:42 GMT 2024
    - 4.6K bytes
    - Viewed (0)
Back to top