-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathconfig.go
52 lines (39 loc) · 1.13 KB
/
config.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
40
41
42
43
44
45
46
47
48
49
50
51
52
// Copyright © 2016-2018 Eduard Sesigin. All rights reserved. Contacts: <[email protected]>
package bxog
// Gonfig
// Multiplexer configuration
type typeHash uint64
// Types sections URL
const (
TYPE_STAT = iota
TYPE_ARG
)
// Editable parameters
const (
// The maximum number of routes
MAX_ROUTES = 256
// The method used by default when you add a Route.
// Example: GET, POST etc.
HTTP_METHOD_DEFAULT = "GET"
// Maximum number of sections in the URL
// Example: /abc/:par - 2 sections, /a/:b/:c - 3 sections
HTTP_SECTION_COUNT = 32
// The maximum length of URL (characters)
HTTP_PATTERN_COUNT = 256
// The maximum wait time during a read operation
READ_TIME_OUT = 100
// The maximum wait time during a write operation
WRITE_TIME_OUT = 100
// Address directory for files on the website URL
FILE_PREF = "/file/"
// Address directory for files on your computer
FILE_PATH = "./file/"
)
// Non-editable parameters
const (
DELIMITER_STRING = "/"
DELIMITER_BYTE byte = 47
DELIMITER_UINT typeHash = 47
SLASH_HASH typeHash = 1
DELIMITER_IN_LIST = MAX_ROUTES * (HTTP_SECTION_COUNT * 3)
)