Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for ObjectSizeLessThan (0.21 sec)

  1. internal/bucket/lifecycle/and.go

    	ObjectSizeLessThan    int64    `xml:"ObjectSizeLessThan,omitempty"`
    	Prefix                Prefix   `xml:"Prefix,omitempty"`
    	Tags                  []Tag    `xml:"Tag,omitempty"`
    }
    
    // isEmpty returns true if Tags field is null
    func (a And) isEmpty() bool {
    	return len(a.Tags) == 0 && !a.Prefix.set &&
    		a.ObjectSizeGreaterThan == 0 && a.ObjectSizeLessThan == 0
    }
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Jan 18 07:03:17 UTC 2024
    - 2.9K bytes
    - Viewed (0)
  2. internal/bucket/lifecycle/filter_test.go

    	}
    	f2 = Filter{}
    	err = xml.Unmarshal(b, &f2)
    	if err != nil {
    		t.Fatalf("Failed to unmarshal %s", string(b))
    	}
    	if f1.And.ObjectSizeLessThan != f2.And.ObjectSizeLessThan {
    		t.Fatalf("Expected %v but got %v", f1.And.ObjectSizeLessThan, f2.And.ObjectSizeLessThan)
    	}
    	if f1.And.ObjectSizeGreaterThan != f2.And.ObjectSizeGreaterThan {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue Feb 27 00:01:20 UTC 2024
    - 7.2K bytes
    - Viewed (0)
  3. internal/bucket/lifecycle/filter.go

    		if err := e.EncodeElement(f.Prefix, xml.StartElement{Name: xml.Name{Local: "Prefix"}}); err != nil {
    			return err
    		}
    
    		if f.ObjectSizeLessThan > 0 {
    			if err := e.EncodeElement(f.ObjectSizeLessThan, xml.StartElement{Name: xml.Name{Local: "ObjectSizeLessThan"}}); err != nil {
    				return err
    			}
    		}
    		if f.ObjectSizeGreaterThan > 0 {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Wed Sep 04 17:01:26 UTC 2024
    - 6.2K bytes
    - Viewed (0)
  4. internal/bucket/lifecycle/rule_test.go

    	                    </Rule>`,
    			expectedErr: errInvalidRuleStatus,
    		},
    		{ // Rule with negative values for ObjectSizeLessThan
    			inputXML: `<Rule>
    				<ID>negative-obj-size-less-than</ID>
    				<Filter><ObjectSizeLessThan>-1</ObjectSizeLessThan></Filter>
    				<Expiration>
    					<Days>365</Days>
    				</Expiration>
                                <Status>Enabled</Status>
    	                    </Rule>`,
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Wed May 01 01:11:10 UTC 2024
    - 4.9K bytes
    - Viewed (0)
  5. internal/bucket/lifecycle/lifecycle_test.go

    			Expiration: Expiration{
    				set:  true,
    				Days: 1,
    			},
    		},
    		{
    			ID:     "rule-with-sz-lt",
    			Status: "Enabled",
    			Filter: Filter{
    				set:                true,
    				ObjectSizeLessThan: 100 * humanize.MiByte,
    			},
    			Expiration: Expiration{
    				set:  true,
    				Days: 1,
    			},
    		},
    		{
    			ID:     "rule-with-sz-gt",
    			Status: "Enabled",
    			Filter: Filter{
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu May 23 01:12:48 UTC 2024
    - 55.1K bytes
    - Viewed (0)
Back to top