Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for ParseLifecycleConfigWithID (0.31 sec)

  1. internal/bucket/lifecycle/lifecycle.go

    		}
    		if !rule.Transition.IsNull() { // this allows for Transition.Days to be zero.
    			return true
    		}
    
    	}
    	return false
    }
    
    // ParseLifecycleConfigWithID - parses for a Lifecycle config and assigns
    // unique id to rules with empty ID.
    func ParseLifecycleConfigWithID(r io.Reader) (*Lifecycle, error) {
    	var lc Lifecycle
    	if err := xml.NewDecoder(r).Decode(&lc); err != nil {
    		return nil, err
    	}
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Sat Mar 09 06:41:22 GMT 2024
    - 17K bytes
    - Viewed (0)
  2. cmd/bucket-lifecycle-handlers.go

    	// Check if bucket exists.
    	if _, err := objAPI.GetBucketInfo(ctx, bucket, BucketOptions{}); err != nil {
    		writeErrorResponse(ctx, w, toAPIError(ctx, err), r.URL)
    		return
    	}
    
    	bucketLifecycle, err := lifecycle.ParseLifecycleConfigWithID(io.LimitReader(r.Body, r.ContentLength))
    	if err != nil {
    		writeErrorResponse(ctx, w, toAPIError(ctx, err), r.URL)
    		return
    	}
    
    	// Validate the received bucket policy document
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Tue Nov 21 17:48:06 GMT 2023
    - 7K bytes
    - Viewed (0)
  3. internal/bucket/lifecycle/lifecycle_test.go

    		                          <Expiration><Days>3</Days></Expiration>
    		                          </Rule>
    		                          </LifecycleConfiguration>`))
    	lc, err := ParseLifecycleConfigWithID(r)
    	if err != nil {
    		t.Fatalf("Expected parsing to succeed but failed with %v", err)
    	}
    	for _, rule := range lc.Rules {
    		if rule.ID == "" {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Sat Mar 09 06:41:22 GMT 2024
    - 45.6K bytes
    - Viewed (0)
Back to top