feat(error): Create api error. WIP
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
33
constant/constant.go
Normal file
33
constant/constant.go
Normal file
@ -0,0 +1,33 @@
|
||||
package constant
|
||||
|
||||
type contextKey string
|
||||
|
||||
//nolint:exported // keeping the enum simple and readable.
|
||||
const (
|
||||
ContextKey_Logger contextKey = "logger"
|
||||
ContextKey_RequestID contextKey = "requestID"
|
||||
)
|
||||
|
||||
type headerKey string
|
||||
|
||||
//nolint:exported // keeping the enum simple and readable.
|
||||
const (
|
||||
HeaderKey_RequestID headerKey = "X-REQUEST-ID"
|
||||
HeaderKey_Token headerKey = "X-TOKEN"
|
||||
)
|
||||
|
||||
type logField string
|
||||
|
||||
//nolint:exported // keeping the enum simple and readable.
|
||||
const (
|
||||
LogField_RequestID logField = "request_id"
|
||||
LogField_Method logField = "method"
|
||||
LogField_CanonPath logField = "canon_path"
|
||||
LogField_Path logField = "path"
|
||||
LogField_StatusCode logField = "status_code"
|
||||
LogField_Username logField = "username"
|
||||
LogField_IP logField = "real_ip"
|
||||
LogField_Duration logField = "duration_ms"
|
||||
LogField_Error logField = "error"
|
||||
LogField_ErrorCode logField = "error_code"
|
||||
)
|
Reference in New Issue
Block a user