Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 10 for ParseObjectTags (0.1 sec)

  1. cmd/api-headers.go

    	if !objInfo.Expires.IsZero() {
    		w.Header().Set(xhttp.Expires, objInfo.Expires.UTC().Format(http.TimeFormat))
    	}
    
    	// Set tag count if object has tags
    	if len(objInfo.UserTags) > 0 {
    		tags, _ := tags.ParseObjectTags(objInfo.UserTags)
    		if tags != nil && tags.Count() > 0 {
    			w.Header()[xhttp.AmzTagCount] = []string{strconv.Itoa(tags.Count())}
    			if opts.Tagging {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue May 28 04:44:00 UTC 2024
    - 7K bytes
    - Viewed (0)
  2. internal/bucket/lifecycle/filter.go

    			}
    		}
    		f.cachedTags = cache
    	}
    
    	// This filter does not have any tags, always return true
    	if len(f.cachedTags) == 0 {
    		return true
    	}
    
    	parsedTags, err := tags.ParseObjectTags(userTags)
    	if err != nil {
    		return false
    	}
    	tagsMap := parsedTags.ToMap()
    
    	// Not enough tags on object to satisfy the rule filter's tags
    	if len(tagsMap) < len(f.cachedTags) {
    		return false
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Wed Sep 04 17:01:26 UTC 2024
    - 6.2K bytes
    - Viewed (0)
  3. cmd/batch-rotate.go

    			// Only parse object tags if tags filter is specified.
    			tagMap := map[string]string{}
    			tagStr := info.Metadata[xhttp.AmzObjectTagging]
    			if len(tagStr) != 0 {
    				t, err := tags.ParseObjectTags(tagStr)
    				if err != nil {
    					return false
    				}
    				tagMap = t.ToMap()
    			}
    
    			for _, kv := range r.Flags.Filter.Tags {
    				for t, v := range tagMap {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Wed Sep 18 17:59:03 UTC 2024
    - 14.7K bytes
    - Viewed (0)
  4. cmd/batch-handlers.go

    			return true
    		}
    
    		if hasTags {
    			// Only parse object tags if tags filter is specified.
    			tagMap := map[string]string{}
    			tagStr := oi.UserTags
    			if len(tagStr) != 0 {
    				t, err := tags.ParseObjectTags(tagStr)
    				if err != nil {
    					return false
    				}
    				tagMap = t.ToMap()
    			}
    			for _, kv := range r.Flags.Filter.Tags {
    				for t, v := range tagMap {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Oct 18 15:32:09 UTC 2024
    - 62.2K bytes
    - Viewed (0)
  5. cmd/batch-expire.go

    		return false
    	}
    
    	if len(ef.Tags) > 0 && !obj.DeleteMarker {
    		// Only parse object tags if tags filter is specified.
    		var tagMap map[string]string
    		if len(obj.UserTags) != 0 {
    			t, err := tags.ParseObjectTags(obj.UserTags)
    			if err != nil {
    				return false
    			}
    			tagMap = t.ToMap()
    		}
    
    		for _, kv := range ef.Tags {
    			// Object (version) must match all tags specified in
    			// the filter
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Wed Sep 18 17:59:03 UTC 2024
    - 21.9K bytes
    - Viewed (0)
  6. cmd/object-handlers.go

    	// If x-amz-tagging-directive header is REPLACE, get passed tags.
    	if isDirectiveReplace(r.Header.Get(xhttp.AmzTagDirective)) {
    		objTags = r.Header.Get(xhttp.AmzObjectTagging)
    		if _, err := tags.ParseObjectTags(objTags); err != nil {
    			writeErrorResponse(ctx, w, toAPIError(ctx, err), r.URL)
    			return
    		}
    	}
    
    	if objTags != "" {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Sat Oct 05 05:16:15 UTC 2024
    - 117.4K bytes
    - Viewed (0)
  7. cmd/object-multipart-handlers.go

    	if err != nil {
    		writeErrorResponse(ctx, w, toAPIError(ctx, err), r.URL)
    		return
    	}
    
    	if objTags := r.Header.Get(xhttp.AmzObjectTagging); objTags != "" {
    		if _, err := tags.ParseObjectTags(objTags); err != nil {
    			writeErrorResponse(ctx, w, toAPIError(ctx, err), r.URL)
    			return
    		}
    
    		metadata[xhttp.AmzObjectTagging] = objTags
    	}
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Sat Aug 31 18:25:48 UTC 2024
    - 39.2K bytes
    - Viewed (0)
  8. cmd/bucket-replication.go

    			SourceETag:         objInfo.ETag,
    			ReplicationRequest: true, // always set this to distinguish between `mc mirror` replication and serverside
    		},
    	}
    	if objInfo.UserTags != "" {
    		tag, _ := tags.ParseObjectTags(objInfo.UserTags)
    		if tag != nil {
    			putOpts.UserTags = tag.ToMap()
    			// set tag timestamp in opts
    			tagTimestamp := objInfo.ModTime
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Oct 10 06:49:55 UTC 2024
    - 116.1K bytes
    - Viewed (0)
  9. cmd/erasure-object.go

    	// GetObjectInfo will return tag value as well
    	oi, err := er.GetObjectInfo(ctx, bucket, object, opts)
    	if err != nil {
    		return nil, err
    	}
    
    	return tags.ParseObjectTags(oi.UserTags)
    }
    
    // TransitionObject - transition object content to target tier.
    func (er erasureObjects) TransitionObject(ctx context.Context, bucket, object string, opts ObjectOptions) error {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Oct 31 22:10:24 UTC 2024
    - 78.8K bytes
    - Viewed (0)
  10. cmd/erasure-server-pool.go

    		return z.serverPools[0].GetObjectTags(ctx, bucket, object, opts)
    	}
    
    	oi, _, err := z.getLatestObjectInfoWithIdx(ctx, bucket, object, opts)
    	if err != nil {
    		return nil, err
    	}
    
    	return tags.ParseObjectTags(oi.UserTags)
    }
    
    // TransitionObject - transition object content to target tier.
    func (z *erasureServerPools) TransitionObject(ctx context.Context, bucket, object string, opts ObjectOptions) error {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Sun Sep 29 22:40:36 UTC 2024
    - 89.8K bytes
    - Viewed (0)
Back to top