Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 37 for isEmpty (0.24 sec)

  1. internal/bucket/replication/filter.go

    	Prefix  string
    	And     And
    	Tag     Tag
    
    	// Caching tags, only once
    	cachedTags map[string]string
    }
    
    // IsEmpty returns true if filter is not set
    func (f Filter) IsEmpty() bool {
    	return f.And.isEmpty() && f.Tag.IsEmpty() && f.Prefix == ""
    }
    
    // MarshalXML - produces the xml representation of the Filter struct
    // only one of Prefix, And and Tag should be present in the output.
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Wed Sep 28 18:25:46 GMT 2022
    - 3.5K bytes
    - Viewed (2)
  2. internal/bucket/replication/rule.go

    	Status Status `xml:"Status"` // should be set to "Disabled" by default
    }
    
    // IsEmpty returns true if DeleteMarkerReplication is not set
    func (d DeleteMarkerReplication) IsEmpty() bool {
    	return len(d.Status) == 0
    }
    
    // Validate validates whether the status is disabled.
    func (d DeleteMarkerReplication) Validate() error {
    	if d.IsEmpty() {
    		return errDeleteMarkerReplicationMissing
    	}
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Mon Jan 24 23:22:20 GMT 2022
    - 8.3K bytes
    - Viewed (0)
  3. internal/bucket/replication/tag.go

    	errInvalidTagValue = Errorf("The TagValue you have provided is invalid")
    )
    
    func (tag Tag) String() string {
    	return tag.Key + "=" + tag.Value
    }
    
    // IsEmpty returns whether this tag is empty or not.
    func (tag Tag) IsEmpty() bool {
    	return tag.Key == ""
    }
    
    // Validate checks this tag.
    func (tag Tag) Validate() error {
    	if len(tag.Key) == 0 || utf8.RuneCountInString(tag.Key) > 128 {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Tue Jun 01 21:59:40 GMT 2021
    - 1.6K bytes
    - Viewed (0)
  4. internal/event/targetidset.go

    // along with this program.  If not, see <http://www.gnu.org/licenses/>.
    
    package event
    
    // TargetIDSet - Set representation of TargetIDs.
    type TargetIDSet map[TargetID]struct{}
    
    // IsEmpty returns true if the set is empty.
    func (set TargetIDSet) IsEmpty() bool {
    	return len(set) != 0
    }
    
    // Clone - returns copy of this set.
    func (set TargetIDSet) Clone() TargetIDSet {
    	setCopy := NewTargetIDSet()
    	for k, v := range set {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 1.9K bytes
    - Viewed (0)
  5. internal/bucket/lifecycle/tag.go

    			default:
    				return errUnknownXMLTag
    			}
    		}
    	}
    
    	return nil
    }
    
    func (tag Tag) String() string {
    	return tag.Key + "=" + tag.Value
    }
    
    // IsEmpty returns whether this tag is empty or not.
    func (tag Tag) IsEmpty() bool {
    	return tag.Key == ""
    }
    
    // Validate checks this tag.
    func (tag Tag) Validate() error {
    	if len(tag.Key) == 0 || utf8.RuneCountInString(tag.Key) > 128 {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Mon Mar 06 16:56:10 GMT 2023
    - 2.4K bytes
    - Viewed (0)
  6. 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
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Tue Nov 16 17:28:29 GMT 2021
    - 8.4K bytes
    - Viewed (0)
  7. cmd/bucket-lifecycle.go

    	S3 S3Location `xml:"S3,omitempty"`
    }
    
    // IsEmpty returns true if output location not specified.
    func (o *OutputLocation) IsEmpty() bool {
    	return o.S3.BucketName == ""
    }
    
    // SelectParameters specifies sql select parameters
    type SelectParameters struct {
    	s3select.S3Select
    }
    
    // IsEmpty returns true if no select parameters set
    func (sp *SelectParameters) IsEmpty() bool {
    	return sp == nil
    }
    
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Wed Apr 17 05:09:58 GMT 2024
    - 33.1K bytes
    - Viewed (0)
  8. internal/s3select/select.go

    		parsedInput.CompressionType = noneType
    	}
    
    	found := 0
    	if !parsedInput.CSVArgs.IsEmpty() {
    		parsedInput.format = csvFormat
    		found++
    	}
    	if !parsedInput.JSONArgs.IsEmpty() {
    		parsedInput.format = jsonFormat
    		found++
    	}
    	if !parsedInput.ParquetArgs.IsEmpty() {
    		if parsedInput.CompressionType != "" && parsedInput.CompressionType != noneType {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Mon Nov 06 22:26:08 GMT 2023
    - 21K bytes
    - Viewed (0)
  9. internal/bucket/lifecycle/rule.go

    }
    
    func (r Rule) validateNoncurrentExpiration() error {
    	return r.NoncurrentVersionExpiration.Validate()
    }
    
    func (r Rule) validatePrefixAndFilter() error {
    	if !r.Prefix.set && r.Filter.IsEmpty() || r.Prefix.set && !r.Filter.IsEmpty() {
    		return errXMLNotWellFormed
    	}
    	if !r.Prefix.set {
    		return r.Filter.Validate()
    	}
    	return nil
    }
    
    func (r Rule) validateTransition() error {
    	return r.Transition.Validate()
    }
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Tue Nov 21 17:48:06 GMT 2023
    - 5K bytes
    - Viewed (0)
  10. cmd/iam-store.go

    		newPolicySet = existingPolicySet.Difference(policiesToUpdate)
    	}
    	// We return an error if the requested policy update will have no effect.
    	if policiesToUpdate.IsEmpty() {
    		err = errNoPolicyToAttachOrDetach
    		return
    	}
    
    	newPolicies := newPolicySet.ToSlice()
    	newPolicyMapping.Policies = strings.Join(newPolicies, ",")
    	newPolicyMapping.UpdatedAt = UTCNow()
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Sat Apr 27 10:04:10 GMT 2024
    - 75.2K bytes
    - Viewed (2)
Back to top