Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 28 for ParseBool (0.24 sec)

  1. internal/config/bool-flag.go

    func FormatBool(b bool) string {
    	if b {
    		return "on"
    	}
    	return "off"
    }
    
    // ParseBool returns the boolean value represented by the string.
    // It accepts 1, t, T, TRUE, true, True, 0, f, F, FALSE, false, False.
    // Any other value returns an error.
    func ParseBool(str string) (bool, error) {
    	switch str {
    	case "1", "t", "T", "true", "TRUE", "True", "on", "ON", "On":
    		return true, nil
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Apr 07 15:10:40 UTC 2022
    - 2.3K bytes
    - Viewed (0)
  2. cni/pkg/plugin/sidecar_redirect.go

    		// parse and set the bool value of dnsRedirect
    		redir.dnsRedirect, valErr = strconv.ParseBool(v)
    		if valErr != nil {
    			log.Warnf("cannot parse DNS capture environment variable %v", valErr)
    		}
    	}
    	if v, found := pi.ProxyEnvironments["ISTIO_DUAL_STACK"]; found {
    		// parse and set the bool value of dnsRedirect
    		redir.dualStack, valErr = strconv.ParseBool(v)
    		if valErr != nil {
    Registered: Wed Nov 06 22:53:10 UTC 2024
    - Last Modified: Fri Jan 26 20:34:28 UTC 2024
    - 10.6K bytes
    - Viewed (0)
  3. internal/logger/config.go

    	for k, kv := range config.Merge(scfg[config.AuditKafkaSubSys], EnvKafkaEnable, DefaultAuditKafkaKVS) {
    		enabledCfgVal := getCfgVal(EnvKafkaEnable, k, kv.Get(config.Enable))
    		enabled, err := config.ParseBool(enabledCfgVal)
    		if err != nil {
    			return cfg, err
    		}
    		if !enabled {
    			continue
    		}
    		var brokers []xnet.Host
    		kafkaBrokers := getCfgVal(EnvKafkaBrokers, k, kv.Get(KafkaBrokers))
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Sep 20 16:02:50 UTC 2024
    - 18.3K bytes
    - Viewed (0)
  4. internal/crypto/auto-encryption.go

    )
    
    // LookupAutoEncryption returns true if and only if
    // the MINIO_KMS_AUTO_ENCRYPTION env. variable is
    // set to "on".
    func LookupAutoEncryption() bool {
    	auto, _ := config.ParseBool(env.Get(EnvKMSAutoEncryption, config.EnableOff))
    	return auto
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 1.4K bytes
    - Viewed (0)
  5. internal/config/notify/parse.go

    		enableEnv := target.EnvKafkaEnable
    		if k != config.Default {
    			enableEnv = enableEnv + config.Default + k
    		}
    		enabled, err := config.ParseBool(env.Get(enableEnv, kv.Get(config.Enable)))
    		if err != nil {
    			return nil, err
    		}
    		if !enabled {
    			continue
    		}
    		var brokers []xnet.Host
    		brokersEnv := target.EnvKafkaBrokers
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Sep 06 23:06:30 UTC 2024
    - 47K bytes
    - Viewed (0)
  6. internal/config/identity/ldap/config.go

    		isEnableFlagExplicitlySet = true
    		l.LDAP.Enabled, err = config.ParseBool(v)
    		if err != nil {
    			return l, err
    		}
    	}
    
    	l.stsExpiryDuration = defaultLDAPExpiry
    
    	// LDAP connection configuration
    	if v := getCfgVal(ServerInsecure); v != "" {
    		l.LDAP.ServerInsecure, err = config.ParseBool(v)
    		if err != nil {
    			return l, err
    		}
    	}
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Wed Aug 07 12:59:47 UTC 2024
    - 8.4K bytes
    - Viewed (0)
  7. internal/config/identity/tls/config.go

    	}
    	cfg := Config{}
    	var err error
    	v := env.Get(EnvIdentityTLSEnabled, "")
    	if v == "" {
    		return cfg, nil
    	}
    	cfg.Enabled, err = config.ParseBool(v)
    	if err != nil {
    		return Config{}, err
    	}
    	cfg.InsecureSkipVerify, err = config.ParseBool(env.Get(EnvIdentityTLSSkipVerify, kvs.Get(skipVerify)))
    	if err != nil {
    		return Config{}, err
    	}
    	return cfg, nil
    }
    
    const (
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 3.6K bytes
    - Viewed (0)
  8. internal/config/compress/compress.go

    		return cfg, err
    	}
    
    	compress := env.Get(EnvCompressState, kvs.Get(config.Enable))
    	if compress == "" {
    		compress = env.Get(EnvCompress, "")
    	}
    	cfg.Enabled, err = config.ParseBool(compress)
    	if err != nil {
    		// Parsing failures happen due to empty KVS, ignore it.
    		if kvs.Empty() {
    			return cfg, nil
    		}
    		return cfg, err
    	}
    	if !cfg.Enabled {
    		return cfg, nil
    	}
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 5K bytes
    - Viewed (0)
  9. cni/pkg/plugin/plugin.go

    		log.Infof("excluded due to being already injected with istio-init container")
    		return nil
    	}
    
    	if val, ok := pi.ProxyEnvironments["DISABLE_ENVOY"]; ok {
    		if val, err := strconv.ParseBool(val); err == nil && val {
    			log.Infof("excluded due to DISABLE_ENVOY on istio-proxy", podNamespace, podName)
    			return nil
    		}
    	}
    
    	if !pi.Containers.Contains(ISTIOPROXY) {
    Registered: Wed Nov 06 22:53:10 UTC 2024
    - Last Modified: Wed Aug 14 19:36:19 UTC 2024
    - 10.5K bytes
    - Viewed (0)
  10. cmd/bucket-lifecycle-handlers.go

    	}
    
    	vars := mux.Vars(r)
    	bucket := vars["bucket"]
    
    	var withUpdatedAt bool
    	if updatedAtStr := r.Form.Get("withUpdatedAt"); updatedAtStr != "" {
    		var err error
    		withUpdatedAt, err = strconv.ParseBool(updatedAtStr)
    		if err != nil {
    			writeErrorResponse(ctx, w, errorCodes.ToAPIErr(ErrInvalidLifecycleQueryParameter), r.URL)
    			return
    		}
    	}
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 7K bytes
    - Viewed (0)
Back to top