Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for GetObjectRetentionMeta (0.31 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)
  4. cmd/object-handlers.go

    		return
    	}
    
    	objInfo, err := getObjectInfo(ctx, bucket, object, opts)
    	if err != nil {
    		writeErrorResponse(ctx, w, toAPIError(ctx, err), r.URL)
    		return
    	}
    
    	retention := objectlock.GetObjectRetentionMeta(objInfo.UserDefined)
    	if !retention.Mode.Valid() {
    		writeErrorResponse(ctx, w, errorCodes.ToAPIErr(ErrNoSuchObjectLockConfiguration), r.URL)
    		return
    	}
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Sat Oct 05 05:16:15 UTC 2024
    - 117.4K bytes
    - Viewed (0)
Back to top