Search Options

Results per page
Sort
Preferred Languages
Advance

Results 101 - 110 of 122 for decode (0.08 sec)

  1. internal/bucket/replication/rule.go

    		return errDeleteReplicationMissing
    	}
    	if d.Status != Disabled && d.Status != Enabled {
    		return errInvalidDeleteReplicationStatus
    	}
    	return nil
    }
    
    // UnmarshalXML - decodes XML data.
    func (d *DeleteReplication) UnmarshalXML(dec *xml.Decoder, start xml.StartElement) (err error) {
    	// Make subtype to avoid recursive UnmarshalXML().
    	type deleteReplication DeleteReplication
    	drep := deleteReplication{}
    
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Mon Jan 24 23:22:20 UTC 2022
    - 8.3K bytes
    - Viewed (0)
  2. cmd/erasure-encode.go

    	return fmt.Errorf("%w (offline-disks=%d/%d)", writeErr, countErrs(p.errs, errDiskNotFound), len(p.writers))
    }
    
    // Encode reads from the reader, erasure-encodes the data and writes to the writers.
    func (e *Erasure) Encode(ctx context.Context, src io.Reader, writers []io.Writer, buf []byte, quorum int) (total int64, err error) {
    	writer := &multiWriter{
    		writers:     writers,
    		writeQuorum: quorum,
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Wed May 15 00:11:04 UTC 2024
    - 2.9K bytes
    - Viewed (0)
  3. internal/bucket/replication/sourceselectioncriteria.go

    	if (s == SourceSelectionCriteria{}) {
    		return nil
    	}
    	if !s.IsValid() {
    		return errInvalidSourceSelectionCriteria
    	}
    	return nil
    }
    
    // UnmarshalXML - decodes XML data.
    func (s *SourceSelectionCriteria) UnmarshalXML(dec *xml.Decoder, start xml.StartElement) (err error) {
    	// Make subtype to avoid recursive UnmarshalXML().
    	type sourceSelectionCriteria SourceSelectionCriteria
    	ssc := sourceSelectionCriteria{}
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Tue Jun 01 21:59:40 UTC 2021
    - 2.5K bytes
    - Viewed (0)
  4. internal/event/arn.go

    }
    
    // MarshalXML - encodes to XML data.
    func (arn ARN) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
    	return e.EncodeElement(arn.String(), start)
    }
    
    // UnmarshalXML - decodes XML data.
    func (arn *ARN) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
    	var s string
    	if err := d.DecodeElement(&s, &start); err != nil {
    		return err
    	}
    
    	parsedARN, err := parseARN(s)
    	if err != nil {
    		return err
    	}
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Tue Jun 01 21:59:40 UTC 2021
    - 2.1K bytes
    - Viewed (0)
  5. internal/bucket/lifecycle/transition.go

    	if !t.set {
    		return nil
    	}
    	type transitionWrapper Transition
    	return enc.EncodeElement(transitionWrapper(t), start)
    }
    
    // UnmarshalXML decodes transition field from the XML form.
    func (t *Transition) UnmarshalXML(d *xml.Decoder, startElement xml.StartElement) error {
    	type transitionWrapper Transition
    	var trw transitionWrapper
    	err := d.DecodeElement(&trw, &startElement)
    	if err != nil {
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Mon Jan 10 17:07:49 UTC 2022
    - 5.1K bytes
    - Viewed (0)
  6. internal/bucket/lifecycle/lifecycle_test.go

    				set:                     true,
    			},
    		},
    	}
    	for i, tc := range testCases {
    		var got NoncurrentVersionExpiration
    		dec := xml.NewDecoder(strings.NewReader(tc.xml))
    		if err := dec.Decode(&got); err != nil || got != tc.expected {
    			if err != nil {
    				t.Fatalf("%d: Failed to unmarshal xml %v", i+1, err)
    			}
    			t.Fatalf("%d: Expected %v but got %v", i+1, tc.expected, got)
    		}
    	}
    }
    
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Thu May 23 01:12:48 UTC 2024
    - 55.1K bytes
    - Viewed (0)
  7. internal/event/name.go

    // MarshalXML - encodes to XML data.
    func (name Name) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
    	return e.EncodeElement(name.String(), start)
    }
    
    // UnmarshalXML - decodes XML data.
    func (name *Name) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
    	var s string
    	if err := d.DecodeElement(&s, &start); err != nil {
    		return err
    	}
    
    	eventName, err := ParseName(s)
    	if err != nil {
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Wed May 01 01:11:10 UTC 2024
    - 10.4K bytes
    - Viewed (0)
  8. internal/s3select/json/reader.go

    )
    
    // Reader - JSON record reader for S3Select.
    type Reader struct {
    	args       *ReaderArgs
    	decoder    *jstream.Decoder
    	valueCh    chan *jstream.MetaValue
    	readCloser io.ReadCloser
    }
    
    // Read - reads single record.
    func (r *Reader) Read(dst sql.Record) (sql.Record, error) {
    	v, ok := <-r.valueCh
    	if !ok {
    		if err := r.decoder.Err(); err != nil {
    			return nil, errJSONParsingError(err)
    		}
    		return nil, io.EOF
    	}
    
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Thu Mar 24 03:58:53 UTC 2022
    - 3K bytes
    - Viewed (0)
  9. cmd/test-utils_test.go

    			t.Fatalf("Unexpected err: %#v", err)
    		}
    		rec := httptest.NewRecorder()
    		apiRouter.ServeHTTP(rec, reqI)
    		checkRespErr(rec, http.StatusOK)
    		decoder := xml.NewDecoder(rec.Body)
    		multipartResponse := &InitiateMultipartUploadResponse{}
    		err = decoder.Decode(multipartResponse)
    		if err != nil {
    			t.Fatalf("Error decoding the recorded response Body")
    		}
    		upID := multipartResponse.UploadID
    
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Mon Jun 10 15:50:49 UTC 2024
    - 76.9K bytes
    - Viewed (0)
  10. internal/config/lambda/event/targetid.go

    	return ARN{TargetID: tid, region: region}
    }
    
    // MarshalJSON - encodes to JSON data.
    func (tid TargetID) MarshalJSON() ([]byte, error) {
    	return json.Marshal(tid.String())
    }
    
    // UnmarshalJSON - decodes JSON data.
    func (tid *TargetID) UnmarshalJSON(data []byte) error {
    	var s string
    	if err := json.Unmarshal(data, &s); err != nil {
    		return err
    	}
    
    	targetID, err := parseTargetID(s)
    	if err != nil {
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Tue Mar 07 16:12:41 UTC 2023
    - 1.8K bytes
    - Viewed (0)
Back to top