constantmdl.go 1.82 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        = "!#$%&'()*+,-./:;<=>?@[]^_`{|}~"
)

// HTTP400ERROR is used to check 400 status
const HTTP400ERROR = 400
Mayuri Shinde's avatar
Mayuri Shinde committed

// MySQL Default Parameters
const (
	// MAX_IDLE_CONNECTIONS - MaxIdleConns
	MAX_IDLE_CONNECTIONS = 100
	// MAX_OPEN_CONNECTIONS - MaxOpenConns
	MAX_OPEN_CONNECTIONS = 5000
	// CONNECTION_MAX_LIFETIME - ConnMaxLifetime
	CONNECTION_MAX_LIFETIME = 3 * 24 * time.Hour
)

const MIME = "MIME-version: 1.0;\nContent-Type: text/html; charset=\"UTF-8\";\n\n"
Mayuri Shinde's avatar
Mayuri Shinde committed
const COUNTRYCODE = "91"