Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 24 for marshalYaml (0.2 sec)

  1. pilot/pkg/config/kube/ingress/conversion_test.go

    				gws := ConvertIngressV1alpha3(*ingress, m, "mydomain")
    				ordered = append(ordered, gws)
    			}
    
    			sort.Slice(ordered, func(i, j int) bool {
    				return ordered[i].Name < ordered[j].Name
    			})
    			output := marshalYaml(t, ordered)
    			goldenFile := fmt.Sprintf("testdata/%s.yaml.golden", tt)
    			if util.Refresh() {
    				if err := os.WriteFile(goldenFile, output, 0o644); err != nil {
    					t.Fatal(err)
    				}
    			}
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri May 19 18:20:34 UTC 2023
    - 14.9K bytes
    - Viewed (0)
  2. pilot/pkg/config/kube/gateway/conversion_test.go

    			})
    			goldenFile := fmt.Sprintf("testdata/%s.yaml.golden", tt.name)
    			res := append(output.Gateway, output.VirtualService...)
    			util.CompareContent(t, marshalYaml(t, res), goldenFile)
    			golden := splitOutput(readConfig(t, goldenFile, validator, tt.validationIgnorer))
    
    			// sort virtual services to make the order deterministic
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed May 08 20:24:52 UTC 2024
    - 34.9K bytes
    - Viewed (0)
  3. internal/bucket/lifecycle/noncurrentversion.go

    	NewerNoncurrentVersions int            `xml:"NewerNoncurrentVersions,omitempty"`
    	set                     bool
    }
    
    // MarshalXML if non-current days not set to non zero value
    func (n NoncurrentVersionExpiration) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
    	if n.IsNull() {
    		return nil
    	}
    	type noncurrentVersionExpirationWrapper NoncurrentVersionExpiration
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Tue Dec 14 17:41:44 UTC 2021
    - 5.3K bytes
    - Viewed (0)
  4. internal/bucket/lifecycle/prefix.go

    	var s string
    	if err = d.DecodeElement(&s, &start); err != nil {
    		return err
    	}
    	*p = Prefix{string: s, set: true}
    	return nil
    }
    
    // MarshalXML - decodes XML data.
    func (p Prefix) MarshalXML(e *xml.Encoder, startElement xml.StartElement) error {
    	if !p.set {
    		return nil
    	}
    	return e.EncodeElement(p.string, startElement)
    }
    
    // String returns the prefix string
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Tue Aug 15 14:45:25 UTC 2023
    - 1.5K bytes
    - Viewed (0)
  5. internal/bucket/lifecycle/expiration.go

    		return err
    	}
    	if numDays <= 0 {
    		return errLifecycleInvalidDays
    	}
    	*eDays = ExpirationDays(numDays)
    	return nil
    }
    
    // MarshalXML encodes number of days to expire if it is non-zero and
    // encodes empty string otherwise
    func (eDays ExpirationDays) MarshalXML(e *xml.Encoder, startElement xml.StartElement) error {
    	if eDays == 0 {
    		return nil
    	}
    	return e.EncodeElement(int(eDays), startElement)
    }
    
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Wed Feb 21 20:28:34 UTC 2024
    - 6.6K bytes
    - Viewed (0)
  6. internal/bucket/lifecycle/transition.go

    		return errTransitionDateNotMidnight
    	}
    
    	*tDate = TransitionDate{trnDate}
    	return nil
    }
    
    // MarshalXML encodes expiration date if it is non-zero and encodes
    // empty string otherwise
    func (tDate TransitionDate) MarshalXML(e *xml.Encoder, startElement xml.StartElement) error {
    	if tDate.Time.IsZero() {
    		return nil
    	}
    	return e.EncodeElement(tDate.Format(time.RFC3339), startElement)
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Mon Jan 10 17:07:49 UTC 2022
    - 5.1K bytes
    - Viewed (0)
  7. internal/bucket/lifecycle/delmarker-expiration.go

    		return err
    	}
    
    	if dexp.Days <= 0 {
    		return errInvalidDaysDelMarkerExpiration
    	}
    
    	*de = DelMarkerExpiration(dexp)
    	return nil
    }
    
    // MarshalXML encodes a DelMarkerExpiration value into an XML element
    func (de DelMarkerExpiration) MarshalXML(enc *xml.Encoder, start xml.StartElement) error {
    	if de.Empty() {
    		return nil
    	}
    
    	type delMarkerExpiration DelMarkerExpiration
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Wed May 01 01:11:10 UTC 2024
    - 2.3K bytes
    - Viewed (0)
  8. internal/event/config.go

    	Name  string `xml:"Name"`
    	Value string `xml:"Value"`
    }
    
    func (filter FilterRule) isEmpty() bool {
    	return filter.Name == "" && filter.Value == ""
    }
    
    // MarshalXML implements a custom marshaller to support `omitempty` feature.
    func (filter FilterRule) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
    	if filter.isEmpty() {
    		return nil
    	}
    	type filterRuleWrapper FilterRule
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Tue Nov 16 17:28:29 UTC 2021
    - 8.4K bytes
    - Viewed (0)
  9. cmd/api-datatypes.go

    }
    
    // DeleteMarkerMTime is an embedded type containing time.Time for XML marshal
    type DeleteMarkerMTime struct {
    	time.Time
    }
    
    // MarshalXML encodes expiration date if it is non-zero and encodes
    // empty string otherwise
    func (t DeleteMarkerMTime) MarshalXML(e *xml.Encoder, startElement xml.StartElement) error {
    	if t.Time.IsZero() {
    		return nil
    	}
    	return e.EncodeElement(t.Time.Format(time.RFC3339), startElement)
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Tue May 14 07:26:50 UTC 2024
    - 3K bytes
    - Viewed (0)
  10. internal/bucket/replication/sourceselectioncriteria.go

    		return err
    	}
    	if len(ssc.ReplicaModifications.Status) == 0 {
    		ssc.ReplicaModifications.Status = Enabled
    	}
    	*s = SourceSelectionCriteria(ssc)
    	return nil
    }
    
    // MarshalXML - encodes to XML data.
    func (s SourceSelectionCriteria) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
    	if err := e.EncodeToken(start); err != nil {
    		return err
    	}
    	if s.IsValid() {
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Tue Jun 01 21:59:40 UTC 2021
    - 2.5K bytes
    - Viewed (0)
Back to top