Search Options

Results per page
Sort
Preferred Languages
Advance

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

  1. internal/bucket/replication/destination.go

    // used prior to multi-destination
    func (d Destination) LegacyArn() bool {
    	return strings.HasPrefix(d.ARN, DestinationARNPrefix)
    }
    
    // TargetArn returns true if arn format has prefix  "arn:minio:replication:::"
    // used for multi-destination targets
    func (d Destination) TargetArn() bool {
    	return strings.HasPrefix(d.ARN, DestinationARNMinIOPrefix)
    }
    
    // MarshalXML - encodes to XML data.
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Sep 04 19:57:37 GMT 2023
    - 4K bytes
    - Viewed (2)
  2. internal/event/rules.go

    func NewPattern(prefix, suffix string) (pattern string) {
    	if prefix != "" {
    		if !strings.HasSuffix(prefix, "*") {
    			prefix += "*"
    		}
    
    		pattern = prefix
    	}
    
    	if suffix != "" {
    		if !strings.HasPrefix(suffix, "*") {
    			suffix = "*" + suffix
    		}
    
    		pattern += suffix
    	}
    
    	pattern = strings.ReplaceAll(pattern, "**", "*")
    
    	return pattern
    }
    
    // Rules - event rules
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 2.7K bytes
    - Viewed (0)
  3. internal/bucket/encryption/bucket-sse-config.go

    			}
    		case AWSKms:
    			keyID := rule.DefaultEncryptionAction.MasterKeyID
    			if keyID == "" {
    				return nil, errors.New("MasterKeyID is missing with aws:kms")
    			}
    			spaces := strings.HasPrefix(keyID, " ") || strings.HasSuffix(keyID, " ")
    			if spaces {
    				return nil, errors.New("MasterKeyID contains unsupported characters")
    			}
    		}
    	}
    
    	if config.XMLNS == "" {
    		config.XMLNS = xmlNS
    	}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Oct 25 00:44:15 GMT 2022
    - 4.9K bytes
    - Viewed (0)
  4. internal/disk/stat_linux.go

    	if firstTime {
    		bfs, err := blockdevice.NewDefaultFS()
    		if err == nil {
    			devName := ""
    			diskstats, _ := bfs.ProcDiskstats()
    			for _, dstat := range diskstats {
    				// ignore all loop devices
    				if strings.HasPrefix(dstat.DeviceName, "loop") {
    					continue
    				}
    				if dstat.MajorNumber == info.Major && dstat.MinorNumber == info.Minor {
    					devName = dstat.DeviceName
    					break
    				}
    			}
    			if devName != "" {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Feb 26 19:34:50 GMT 2024
    - 4.8K bytes
    - Viewed (0)
  5. internal/mountinfo/mountinfo_linux.go

    		// `/tmp/fs/` to be a common prefix amount other mounts.
    		mpath := strings.TrimSuffix(mount.Path, "/") + "/"
    		ppath := strings.TrimSuffix(path, "/") + "/"
    		if strings.HasPrefix(mpath, ppath) {
    			// At this point if the mount point has a common prefix two conditions can happen.
    			// - mount.Path matches exact with `path` means we can proceed no error here.
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sun Jan 02 17:15:06 GMT 2022
    - 4.7K bytes
    - Viewed (0)
  6. cmd/admin-server-info.go

    		config.EnvRootUser:          {},
    		config.EnvRootPassword:      {},
    		config.EnvMinIOSubnetAPIKey: {},
    		kms.EnvKMSSecretKey:         {},
    	}
    	for _, v := range os.Environ() {
    		if !strings.HasPrefix(v, "MINIO") && !strings.HasPrefix(v, "_MINIO") {
    			continue
    		}
    		split := strings.SplitN(v, "=", 2)
    		key := split[0]
    		value := ""
    		if len(split) > 1 {
    			value = split[1]
    		}
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 4.8K bytes
    - Viewed (0)
  7. cmd/metrics-realtime.go

    			Host: globalLocalNodeName,
    		}, false)
    		if _, ok := opts.hosts[server.Endpoint]; ok {
    			byHostName = server.Endpoint
    		} else {
    			return
    		}
    	}
    
    	if strings.HasPrefix(byHostName, ":") && !strings.HasPrefix(globalLocalNodeName, ":") {
    		byHostName = globalLocalNodeName
    	}
    
    	if types.Contains(madmin.MetricsDisk) {
    		m.ByDisk = make(map[string]madmin.DiskMetric)
    		aggr := madmin.DiskMetric{
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed Apr 10 16:28:08 GMT 2024
    - 6.1K bytes
    - Viewed (0)
  8. docs/iam/access-manager-plugin.go

    	var res Result
    	if accountValue == "minio" {
    		res.Result = true
    	} else {
    		// All other users may not perform any `s3:Put*` operations.
    		res.Result = true
    		if strings.HasPrefix(actionValue, "s3:Put") {
    			res.Result = false
    		}
    	}
    	fmt.Printf("account: %v | action: %v | allowed: %v\n", accountValue, actionValue, res.Result)
    	json.NewEncoder(w).Encode(res)
    	return
    }
    
    func main() {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Feb 08 17:15:20 GMT 2024
    - 2.7K bytes
    - Viewed (0)
  9. internal/event/arn.go

    	}
    
    	*arn = *parsedARN
    	return nil
    }
    
    // parseARN - parses string to ARN.
    func parseARN(s string) (*ARN, error) {
    	// ARN must be in the format of arn:minio:sqs:<REGION>:<ID>:<TYPE>
    	if !strings.HasPrefix(s, "arn:minio:sqs:") {
    		return nil, &ErrInvalidARN{s}
    	}
    
    	tokens := strings.Split(s, ":")
    	if len(tokens) != 6 {
    		return nil, &ErrInvalidARN{s}
    	}
    
    	if tokens[4] == "" || tokens[5] == "" {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Jun 01 21:59:40 GMT 2021
    - 2.1K bytes
    - Viewed (0)
  10. cmd/net.go

    	if hostAddr == "" {
    		return "", "", errors.New("unable to process empty address")
    	}
    
    	// Simplify the work of url.Parse() and always send a url with
    	if !strings.HasPrefix(hostAddr, "http://") && !strings.HasPrefix(hostAddr, "https://") {
    		hostAddr = "//" + hostAddr
    	}
    
    	// Parse address to extract host and scheme field
    	u, err := url.Parse(hostAddr)
    	if err != nil {
    		return "", "", err
    	}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Mar 26 15:00:38 GMT 2024
    - 9.3K bytes
    - Viewed (0)
Back to top