Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 8 of 8 for UnmarshalXML (0.18 sec)

  1. internal/bucket/lifecycle/expiration.go

    )
    
    // ExpirationDays is a type alias to unmarshal Days in Expiration
    type ExpirationDays int
    
    // UnmarshalXML parses number of days from Expiration and validates if
    // greater than zero
    func (eDays *ExpirationDays) UnmarshalXML(d *xml.Decoder, startElement xml.StartElement) error {
    	var numDays int
    	err := d.DecodeElement(&numDays, &startElement)
    	if err != nil {
    		return err
    	}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed Feb 21 20:28:34 GMT 2024
    - 6.6K bytes
    - Viewed (1)
  2. internal/bucket/object/lock/lock.go

    const (
    	// This tested by using `mc lock` command
    	maximumRetentionDays  = 36500
    	maximumRetentionYears = 100
    )
    
    // UnmarshalXML - decodes XML data.
    func (dr *DefaultRetention) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
    	// Make subtype to avoid recursive UnmarshalXML().
    	type defaultRetention DefaultRetention
    	retention := defaultRetention{}
    
    	if err := d.DecodeElement(&retention, &start); err != nil {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 17.1K bytes
    - Viewed (0)
  3. internal/bucket/lifecycle/delmarker-expiration.go

    // Used to detect if lifecycle.Rule contained a DelMarkerExpiration element.
    func (de DelMarkerExpiration) Empty() bool {
    	return de.Days == 0
    }
    
    // UnmarshalXML decodes a single XML element into a DelMarkerExpiration value
    func (de *DelMarkerExpiration) UnmarshalXML(dec *xml.Decoder, start xml.StartElement) error {
    	type delMarkerExpiration DelMarkerExpiration
    	var dexp delMarkerExpiration
    	err := dec.DecodeElement(&dexp, &start)
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed May 01 01:11:10 GMT 2024
    - 2.3K bytes
    - Viewed (0)
  4. internal/bucket/lifecycle/filter.go

    				return err
    			}
    		}
    	}
    
    	return e.EncodeToken(xml.EndElement{Name: start.Name})
    }
    
    // UnmarshalXML - decodes XML data.
    func (f *Filter) UnmarshalXML(d *xml.Decoder, start xml.StartElement) (err error) {
    	f.set = true
    	for {
    		// Read tokens from the XML document in a stream.
    		t, err := d.Token()
    		if err != nil {
    			if err == io.EOF {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Feb 27 00:01:20 GMT 2024
    - 6.2K bytes
    - Viewed (0)
  5. 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)
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed May 01 01:11:10 GMT 2024
    - 10.4K bytes
    - Viewed (0)
  6. internal/bucket/lifecycle/lifecycle.go

    	for _, rule := range lc.Rules {
    		if !rule.Expiration.IsNull() || !rule.NoncurrentVersionExpiration.IsNull() {
    			return true
    		}
    	}
    	return false
    }
    
    // UnmarshalXML - decodes XML data.
    func (lc *Lifecycle) UnmarshalXML(d *xml.Decoder, start xml.StartElement) (err error) {
    	switch start.Name.Local {
    	case "LifecycleConfiguration", "BucketLifecycleConfiguration":
    	default:
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed May 01 01:11:10 GMT 2024
    - 17.5K bytes
    - Viewed (0)
  7. cmd/bucket-lifecycle.go

    }
    
    var selectParamsXMLName = "SelectParameters"
    
    // UnmarshalXML - decodes XML data.
    func (sp *SelectParameters) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
    	// Essentially the same as S3Select barring the xml name.
    	if start.Name.Local == selectParamsXMLName {
    		start.Name = xml.Name{Space: "", Local: "SelectRequest"}
    	}
    	return sp.S3Select.UnmarshalXML(d, start)
    }
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed Apr 17 05:09:58 GMT 2024
    - 33.1K bytes
    - Viewed (0)
  8. internal/s3select/csv/reader.go

    	r := &Reader{
    		args:       args,
    		buf:        bufio.NewReaderSize(csvIn, csvSplitSize*2),
    		readCloser: readCloser,
    		close:      make(chan struct{}),
    	}
    
    	// Assume args are validated by ReaderArgs.UnmarshalXML()
    	newCsvReader := func(r io.Reader) *csv.Reader {
    		ret := csv.NewReader(r)
    		ret.Comma = []rune(args.FieldDelimiter)[0]
    		ret.Comment = []rune(args.CommentCharacter)[0]
    		ret.Quote = []rune{}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Feb 22 06:26:06 GMT 2024
    - 8.9K bytes
    - Viewed (0)
Back to top