Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for GetObjectRetentionMeta (0.12 sec)

  1. cmd/bucket-object-lock.go

    		return false
    	}
    
    	lhold := objectlock.GetObjectLegalHoldMeta(objInfo.UserDefined)
    	if lhold.Status.Valid() && lhold.Status == objectlock.LegalHoldOn {
    		return true
    	}
    
    	ret := objectlock.GetObjectRetentionMeta(objInfo.UserDefined)
    	if ret.Mode.Valid() && (ret.Mode == objectlock.RetCompliance || ret.Mode == objectlock.RetGovernance) {
    		t, err := objectlock.UTCNowNTP()
    		if err != nil {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 13.2K bytes
    - Viewed (0)
  2. internal/bucket/object/lock/lock.go

    	}
    
    	if retDate.Before(t) && !replReq {
    		return rmode, r, ErrPastObjectLockRetainDate
    	}
    
    	return rmode, RetentionDate{retDate}, nil
    }
    
    // GetObjectRetentionMeta constructs ObjectRetention from metadata
    func GetObjectRetentionMeta(meta map[string]string) ObjectRetention {
    	var mode RetMode
    	var retainTill RetentionDate
    
    	var modeStr, tillStr string
    	ok := false
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Sat Jun 29 01:20:27 UTC 2024
    - 17.1K bytes
    - Viewed (0)
  3. internal/bucket/object/lock/lock_test.go

    			},
    			expected: ObjectRetention{RetainUntilDate: RetentionDate{time.Date(2020, 2, 1, 12, 0, 0, 0, time.UTC)}},
    		},
    	}
    
    	for i, tt := range tests {
    		o := GetObjectRetentionMeta(tt.metadata)
    		if o.Mode != tt.expected.Mode {
    			t.Fatalf("Case %d expected %v, got %v", i, tt.expected.Mode, o.Mode)
    		}
    	}
    }
    
    func TestGetObjectLegalHoldMeta(t *testing.T) {
    	tests := []struct {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Sat Jun 29 01:20:27 UTC 2024
    - 17.1K bytes
    - Viewed (0)
Back to top