constantmdl.go 1.39 KiB
Newer Older
Ajit Jagtap's avatar
Ajit Jagtap committed
//@author  Ajit Jagtap
//@version Thu Jul 05 2018 06:13:18 GMT+0530 (IST)

// Package constantmdl helps saving constants
package constantmdl

Mahendra Vishwakarma's avatar
Mahendra Vishwakarma committed
import "time"

Ajit Jagtap's avatar
Ajit Jagtap committed
// ZERO gives 0
const ZERO = 0

Mahendra Vishwakarma's avatar
Mahendra Vishwakarma committed
// MINUS_ONE is constant for -1
const MINUS_ONE = -1

Ajit Jagtap's avatar
Ajit Jagtap committed
// STAR gives *
const STAR = "*"
Mahendra Vishwakarma's avatar
Mahendra Vishwakarma committed
// HTTP CLIENT DEFAULT Setting : START

// MAXIDLECONNS - max idle connections
const MAXIDLECONNS = 100

// MAXIDLECONNSPERHOST - max connections per host
const MAXIDLECONNSPERHOST = 100

// IDLECONNTIMEOUT - Idle time out
const IDLECONNTIMEOUT = time.Second * 90

// HTTP CLIENT DEFAULT Setting : END

// TASKCOUNT is used as default task count in filepipe
const TASKCOUNT = 5

// constants used for CreateSecurityKey function in securitymdl
const (
	MAX_RANDOM_STRING_LENGTH = 256
	RANDOM_STRING_LENGTH     = 16
	NUMBERS_PERCENT          = 10
	SMALL_CHARS_PERCENT      = 40
	CAP_CHARS_PERCENT        = 40
	SPECIAL_CHARS_PERCENT    = 10
	CharSet                  = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!#$%&'()*+,-./:;<=>?@[]^_`{|}~0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!#$%&'()*+,-./:;<=>?@[]^_`{|}~0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!#$%&'()*@"
	NUMBERS_SET              = "0123456789"
	SMALL_CHARS_SET          = "abcdefghijklmnopqrstuvwxyz"
	CAP_CHARS_SET            = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
	SPECIAL_CHARS_SET        = "!#$%&'()*+,-./:;<=>?@[]^_`{|}~"
)