Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for NewPattern (0.1 sec)

  1. internal/event/rules_test.go

    		expectedResult int
    	}{
    		{rulesCase1, NewPattern("*", ""), TargetID{"1", "webhook"}, 1},
    		{rulesCase2, NewPattern("*", ""), TargetID{"2", "amqp"}, 2},
    		{rulesCase3, NewPattern("2010*", ""), TargetID{"1", "webhook"}, 1},
    		{rulesCase4, NewPattern("*", ""), TargetID{"1", "webhook"}, 2},
    		{rulesCase5, NewPattern("", "*.jpg"), TargetID{"1", "webhook"}, 1},
    		{rulesCase6, NewPattern("", "*"), TargetID{"2", "amqp"}, 2},
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue Jun 01 21:59:40 UTC 2021
    - 8.8K bytes
    - Viewed (0)
  2. internal/event/rules.go

    // along with this program.  If not, see <http://www.gnu.org/licenses/>.
    
    package event
    
    import (
    	"strings"
    
    	"github.com/minio/pkg/v3/wildcard"
    )
    
    // NewPattern - create new pattern for prefix/suffix.
    func NewPattern(prefix, suffix string) (pattern string) {
    	if prefix != "" {
    		if !strings.HasSuffix(prefix, "*") {
    			prefix += "*"
    		}
    
    		pattern = prefix
    	}
    
    	if suffix != "" {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 2.7K bytes
    - Viewed (0)
  3. cmd/listen-notification-handlers.go

    			writeErrorResponse(ctx, w, toAPIError(ctx, err), r.URL)
    			return
    		}
    
    		suffix = values[peerRESTListenSuffix][0]
    	}
    
    	pattern := event.NewPattern(prefix, suffix)
    
    	var eventNames []event.Name
    	var mask pubsub.Mask
    	for _, s := range values[peerRESTListenEvents] {
    		eventName, err := event.ParseName(s)
    		if err != nil {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 6K bytes
    - Viewed (0)
  4. internal/event/config.go

    	var suffix string
    
    	for _, rule := range ruleList.Rules {
    		switch rule.Name {
    		case "prefix":
    			prefix = rule.Value
    		case "suffix":
    			suffix = rule.Value
    		}
    	}
    
    	return NewPattern(prefix, suffix)
    }
    
    // S3Key - represents elements inside <S3Key>...</S3Key>
    type S3Key struct {
    	RuleList FilterRuleList `xml:"S3Key,omitempty" json:"S3Key,omitempty"`
    }
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue Nov 16 17:28:29 UTC 2021
    - 8.4K bytes
    - Viewed (0)
  5. cmd/peer-rest-server.go

    		if err := event.ValidateFilterRuleValue(values[peerRESTListenSuffix][0]); err != nil {
    			return grid.NewRemoteErr(err)
    		}
    
    		suffix = values[peerRESTListenSuffix][0]
    	}
    
    	pattern := event.NewPattern(prefix, suffix)
    
    	var eventNames []event.Name
    	var mask pubsub.Mask
    	for _, ev := range values[peerRESTListenEvents] {
    		eventName, err := event.ParseName(ev)
    		if err != nil {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Oct 04 11:32:32 UTC 2024
    - 53.2K bytes
    - Viewed (0)
Back to top