Search Options

Results per page
Sort
Preferred Languages
Advance

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

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

    			}
    		}
    	}
    	return nil
    }
    
    // IsEmpty returns true if struct is empty
    func (l *ObjectLegalHold) IsEmpty() bool {
    	return !l.Status.Valid()
    }
    
    // ParseObjectLegalHold decodes the XML into ObjectLegalHold
    func ParseObjectLegalHold(reader io.Reader) (hold *ObjectLegalHold, err error) {
    	buf, err := io.ReadAll(io.LimitReader(reader, maxObjectLockConfigSize))
    	if err != nil {
    		return nil, err
    	}
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Sat Jun 29 01:20:27 UTC 2024
    - 17.1K bytes
    - Viewed (0)
  2. internal/bucket/object/lock/lock_test.go

    			expectedErr: ErrMalformedXML,
    			expectErr:   true,
    		},
    	}
    	for i, tt := range tests {
    		_, err := ParseObjectLegalHold(strings.NewReader(tt.value))
    		//nolint:gocritic
    		if tt.expectedErr == nil {
    			if err != nil {
    				t.Fatalf("Case %d error: expected = <nil>, got = %v", i, err)
    			}
    		} else if err == nil {
    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. cmd/object-handlers.go

    		writeErrorResponse(ctx, w, errorCodes.ToAPIErr(ErrInvalidBucketObjectLockConfiguration), r.URL)
    		return
    	}
    
    	legalHold, err := objectlock.ParseObjectLegalHold(io.LimitReader(r.Body, r.ContentLength))
    	if err != nil {
    		apiErr := errorCodes.ToAPIErr(ErrMalformedXML)
    		apiErr.Description = err.Error()
    		writeErrorResponse(ctx, w, apiErr, 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