Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Config internalConfiguration
View Source
var ErrNotJson = errors.New("request body is not JSON")
Functions ¶
func Configure ¶
func Configure(config Configuration)
func GinMiddleware ¶
func GinMiddleware() gin.HandlerFunc
Types ¶
type BaseUrlOptions ¶
type BaseUrlOptions struct {
Debug bool
}
type BodyLogWriter ¶
type BodyLogWriter struct { gin.ResponseWriter Body *bytes.Buffer }
type Configuration ¶
Configuration sets up and customizes communication with the Treblle API
type DataInfo ¶
type DataInfo struct { Server ServerInfo `json:"server"` Language LanguageInfo `json:"language"` Request RequestInfo `json:"request"` Response ResponseInfo `json:"response"` }
type LanguageInfo ¶
type RequestInfo ¶
type RequestInfo struct { Timestamp string `json:"timestamp"` Ip string `json:"ip"` Url string `json:"url"` UserAgent string `json:"user_agent"` Method string `json:"method"` Headers json.RawMessage `json:"headers"` Body json.RawMessage `json:"body"` }
type ResponseInfo ¶
type ResponseInfo struct { Headers json.RawMessage `json:"headers"` Code int `json:"code"` Size int `json:"size"` LoadTime float64 `json:"load_time"` Body json.RawMessage `json:"body"` Errors []ErrorInfo `json:"errors"` }
Click to show internal directories.
Click to hide internal directories.