Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 46 for Days (0.12 sec)

  1. internal/bucket/lifecycle/transition.go

    }
    
    // TransitionDays is a type alias to unmarshal Days in Transition
    type TransitionDays int
    
    // UnmarshalXML parses number of days from Transition and validates if
    // >= 0
    func (tDays *TransitionDays) UnmarshalXML(d *xml.Decoder, startElement xml.StartElement) error {
    	var days int
    	err := d.DecodeElement(&days, &startElement)
    	if err != nil {
    		return err
    	}
    
    	if days < 0 {
    		return errTransitionInvalidDays
    	}
    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. internal/bucket/lifecycle/delmarker-expiration.go

    import (
    	"encoding/xml"
    	"time"
    )
    
    var errInvalidDaysDelMarkerExpiration = Errorf("Days must be a positive integer with DelMarkerExpiration")
    
    // DelMarkerExpiration used to xml encode/decode ILM action by the same name
    type DelMarkerExpiration struct {
    	XMLName xml.Name `xml:"DelMarkerExpiration"`
    	Days    int      `xml:"Days,omitempty"`
    }
    
    // Empty returns if a DelMarkerExpiration XML element is empty.
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed May 01 01:11:10 GMT 2024
    - 2.3K bytes
    - Viewed (0)
  3. cmd/bucket-lifecycle-handlers_test.go

    			secretKey:          creds.SecretKey,
    			body:               []byte(`<LifecycleConfiguration><Rule><ID>id</ID><Filter><Prefix>logs/</Prefix><Tag><Key>Key1</Key><Value>Value1</Value></Tag></Filter><Status>Enabled</Status><Expiration><Days>365</Days></Expiration></Rule></LifecycleConfiguration>`),
    			expectedRespStatus: http.StatusBadRequest,
    			lifecycleResponse:  []byte(``),
    			errorResponse: APIErrorResponse{
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Jun 13 20:52:33 GMT 2023
    - 11.2K bytes
    - Viewed (0)
  4. cmd/bucket-object-lock.go

    		internalLogIf(ctx, err, logger.WarningKind)
    		return ObjectLocked{Bucket: oi.Bucket, Object: oi.Name, VersionID: oi.VersionID}
    	}
    
    	// Pass in relative days from current time, to additionally
    	// to verify "object-lock-remaining-retention-days" policy if any.
    	days := int(math.Ceil(math.Abs(objRetention.RetainUntilDate.Sub(t).Hours()) / 24))
    
    	ret := objectlock.GetObjectRetentionMeta(oi.UserDefined)
    	if ret.Mode.Valid() {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Apr 22 17:49:30 GMT 2024
    - 13.2K bytes
    - Viewed (0)
  5. cmd/bucket-lifecycle_test.go

    			expectedErr: errInvalidStorageClass,
    		},
    		{
    			// no transition rule
    			xml:         []byte(`<LifecycleConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/"><Rule><ID>rule</ID><Prefix /><Status>Enabled</Status><Expiration><Days>1</Days></Expiration></Rule></LifecycleConfiguration>`),
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue May 31 09:57:57 GMT 2022
    - 7K bytes
    - Viewed (0)
  6. internal/s3select/sql/timestampfuncs.go

    	}
    	return FromTimestamp(t.Add(duration)), nil
    }
    
    // dateDiff computes the difference between two times in terms of the
    // `timePart` which can be years, months, days, hours, minutes or
    // seconds. For difference in years, months or days, the time part,
    // including timezone is ignored.
    func dateDiff(timePart string, ts1, ts2 time.Time) (*Value, error) {
    	if ts2.Before(ts1) {
    		v, err := dateDiff(timePart, ts2, ts1)
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sun Jan 02 17:15:06 GMT 2022
    - 4.8K bytes
    - Viewed (0)
  7. cmd/data-scanner_test.go

    		IsLatest:     true,
    		DeleteMarker: true,
    		NumVersions:  4,
    	}
    	deleteAllILM := `<LifecycleConfiguration>
    			    <Rule>
    		               <Expiration>
    		                  <Days>30</Days>
    	                          <ExpiredObjectAllVersions>true</ExpiredObjectAllVersions>
    	                       </Expiration>
    	                       <Filter></Filter>
    	                       <Status>Enabled</Status>
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri May 03 11:18:58 GMT 2024
    - 6.9K bytes
    - Viewed (0)
  8. cmd/bucket-lifecycle.go

    		return fmt.Errorf("OutputLocation required for SELECT requests")
    	}
    
    	if r.Days != 0 && r.Type == SelectRestoreRequest {
    		return fmt.Errorf("Days cannot be specified with SELECT restore request")
    	}
    	if r.Days == 0 && r.Type != SelectRestoreRequest {
    		return fmt.Errorf("restoration days should be at least 1")
    	}
    	// Check if bucket exists.
    	if !r.OutputLocation.IsEmpty() {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed Apr 17 05:09:58 GMT 2024
    - 33.1K bytes
    - Viewed (0)
  9. cmd/update-notifier_test.go

    func TestPrepareUpdateMessage(t *testing.T) {
    	testCases := []struct {
    		older time.Duration
    		dlURL string
    
    		expectedSubStr string
    	}{
    		// Testcase index 0
    		{72 * time.Hour, "my_download_url", "3 days before the latest release"},
    		{3 * time.Hour, "https://my_download_url_is_huge/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "3 hours before the latest release"},
    		{-72 * time.Hour, "another_update_url", ""},
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Jul 31 15:36:19 GMT 2023
    - 4.1K bytes
    - Viewed (0)
  10. cmd/bucket-lifecycle-audit.go

    		ilmRuleID                  = "ilm-rule-id"
    		ilmTier                    = "ilm-tier"
    		ilmNewerNoncurrentVersions = "ilm-newer-noncurrent-versions"
    		ilmNoncurrentDays          = "ilm-noncurrent-days"
    	)
    	tags := make(map[string]interface{}, 5)
    	if src > lcEventSrc_None {
    		tags[ilmSrc] = src.String()
    	}
    	tags[ilmAction] = event.Action.String()
    	tags[ilmRuleID] = event.RuleID
    
    	if !event.Due.IsZero() {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri Dec 01 15:56:24 GMT 2023
    - 2.6K bytes
    - Viewed (0)
Back to top