-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmodels.go
More file actions
48 lines (40 loc) · 1.2 KB
/
models.go
File metadata and controls
48 lines (40 loc) · 1.2 KB
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
package router
import "time"
const HttpMethodGet = "GET"
const HttpMethodPost = "POST"
const HttpMethodPut = "PUT"
const HttpMethodPatch = "PATCH"
const HttpMethodDelete = "DELETE"
type (
// Key context
Key int
)
const (
services = "Internal Service"
LogKey = Key(48)
COMPLETE_LOGING = "FULLY_LOGGING"
INCOMPLETE_LOGING = "INCOMPLETE_LOGING"
NON_LOGING = "NON_LOGING"
)
// Data is data standard output
type Data struct {
RequestID string `json:"RequestID"`
TimeStart time.Time `json:"TimeStart"`
UserCode string `json:"UserCode"`
Device string `json:"Device"`
Host string `json:"Host"`
Endpoint string `json:"Endpoint"`
RequestMethod string `json:"RequestMethod"`
RequestHeader string `json:"RequestHeader"`
StatusCode int `json:"StatusCode"`
Response string `json:"Response"`
ExecTime float64 `json:"ExecutionTime"`
Messages []string `json:"Messages"`
}
type Responseservice struct {
Status int `json:"status"`
ErrorMessage string `json:"error_message"`
Data interface{} `json:"data"`
Pagination interface{} `json:"pagination"`
Message string `json:"message"`
}