Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for ParseObjectRetention (0.13 sec)

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

    	RetainUntilDate RetentionDate `xml:"RetainUntilDate,omitempty"`
    }
    
    // Maximum 4KiB size per object retention config.
    const maxObjectRetentionSize = 1 << 12
    
    // ParseObjectRetention constructs ObjectRetention struct from xml input
    func ParseObjectRetention(reader io.Reader) (*ObjectRetention, error) {
    	ret := ObjectRetention{}
    	if err := xml.NewDecoder(io.LimitReader(reader, maxObjectRetentionSize)).Decode(&ret); 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)
  2. internal/bucket/object/lock/lock_test.go

    			expectedErr: nil,
    			expectErr:   false,
    		},
    	}
    	for _, tt := range tests {
    		tt := tt
    		t.Run("", func(t *testing.T) {
    			_, err := ParseObjectRetention(strings.NewReader(tt.value))
    			//nolint:gocritic
    			if tt.expectedErr == nil {
    				if err != nil {
    					t.Fatalf("error: expected = <nil>, got = %v", 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)
Back to top