-
Notifications
You must be signed in to change notification settings - Fork 11
/
consts.go
39 lines (36 loc) · 1.94 KB
/
consts.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/*
* Copyright (c) 2023-present unTill Pro, Ltd.
* @author Denis Gribanov
*/
package coreutils
import (
"io/fs"
"math"
"syscall"
"time"
)
const (
Authorization = "Authorization"
ContentType = "Content-Type"
ContentDisposition = "Content-Disposition"
ApplicationJSON = "application/json"
ApplicationXBinary = "application/x-binary"
BearerPrefix = "Bearer "
shortRetryOn503Delay = 100 * time.Millisecond
longRetryOn503Delay = time.Second
shortRetriesOn503Amount = 10
CRC16Mask = uint32(math.MaxUint32 >> 16)
EmailTemplatePrefix_Text = "text:"
emailTemplatePrefix_Resource = "resource:"
emailVerificationCodeLength = 6
emailVerificationCodeSymbols = "1234567890"
maxByte = ^byte(0)
byteRangeToEmailVerifcationSymbolsRangeCoeff = (float32(maxByte) + 1) / float32(len(emailVerificationCodeSymbols))
retryOn_WSAECONNREFUSED_Delay = 20 * time.Millisecond
retryOn_WSAECONNREFUSED_Timeout = 4 * time.Second
WSAECONNRESET syscall.Errno = 10054
WSAECONNREFUSED syscall.Errno = 10061
FileMode_rwxrwxrwx fs.FileMode = 0777 // default for directory
FileMode_rw_rw_rw_ fs.FileMode = 0666 // default for file
maxHTTPRequestTimeout = time.Hour
)