Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for parseLegalHoldStatus (0.22 sec)

  1. internal/bucket/object/lock/lock.go

    	}
    	return ObjectLegalHold{}
    }
    
    // ParseObjectLockLegalHoldHeaders parses request headers to construct ObjectLegalHold
    func ParseObjectLockLegalHoldHeaders(h http.Header) (lhold ObjectLegalHold, err error) {
    	holdStatus, ok := h[AmzObjectLockLegalHold]
    	if ok {
    		lh := parseLegalHoldStatus(holdStatus[0])
    		if !lh.Valid() {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 17.1K bytes
    - Viewed (0)
  2. internal/bucket/object/lock/lock_test.go

    		},
    		{
    			value:          "Off",
    			expectedStatus: LegalHoldOff,
    		},
    		{
    			value:          "x",
    			expectedStatus: "",
    		},
    	}
    
    	for _, tt := range tests {
    		actualStatus := parseLegalHoldStatus(tt.value)
    		if actualStatus != tt.expectedStatus {
    			t.Errorf("Expected legal hold status %s, got %s", tt.expectedStatus, actualStatus)
    		}
    	}
    }
    
    // TestUnmarshalDefaultRetention checks if default retention
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Feb 22 06:26:06 GMT 2024
    - 17.1K bytes
    - Viewed (0)
Back to top