config

package
v0.0.0-...-d77a28c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 24, 2019 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Port defines the port used by the api server
	Port = getEnv("PORT", "8080")
	// SourceAddr defines the address used on verifier
	SourceAddr = getEnv("SOURCE_ADDR", "admin@gmail.com")
	// HTTPClientTimeout defines the HTTP client timeout used in requests
	HTTPClientTimeout, _ = strconv.Atoi(getEnv("HTTP_CLIENT_TIMEOUT", "25"))
	// RateLimitCIDRCustom defines an array of cidr you want to exclude from rate limit "IP|max|hours" example: 192.168.0.0/16|0|0,172.16.0.0/12|0|0,10.0.0.0/8|0|0
	RateLimitCIDRCustom = getEnv("RATE_LIMIT_CIDR", "")
	// RateLimitMax is the maximum number of requests allowed in the
	// specified interval
	RateLimitMax, _ = strconv.ParseInt(getEnv("RATE_LIMIT_MAX", ""), 10, 64)
	// RateLimitHours is the interval in which requests will be rate limited
	RateLimitHours, _ = strconv.ParseInt(getEnv("RATE_LIMIT_HOURS", ""), 10, 64)
)

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL