Documentation
¶
Overview ¶
Copyright © 2020 Pro Warehouse B.V. All Rights Reserved
Copyright © 2020 Pro Warehouse B.V. All Rights Reserved
Copyright © 2020 Pro Warehouse B.V. All Rights Reserved
Copyright © 2020 Pro Warehouse B.V. All Rights Reserved
Copyright © 2020 Pro Warehouse B.V. All Rights Reserved
Copyright © 2020 Pro Warehouse B.V. All Rights Reserved
Index ¶
- func Asset(name string) ([]byte, error)
- func AssetDir(name string) ([]string, error)
- func AssetInfo(name string) (os.FileInfo, error)
- func AssetNames() []string
- func CheckExcludedPaths(path string) bool
- func CheckVariablesAreSet()
- func Dashboard(c *gin.Context)
- func DumpResponse(c *gin.Context, blw *BodyLogWriter, body string)
- func GetDB() *sql.DB
- func GetLogs(c *gin.Context)
- func GetRequests(c *gin.Context)
- func LogDashboard(c *gin.Context)
- func MinifyCss(uncompressed string) string
- func MinifyHtml(uncompressed string) string
- func MinifyJs(uncompressed string) string
- func MustAsset(name string) []byte
- func NavbarComponent(selected string) string
- func ReplaceVariablesInTemplate(rawTemplate string, variables map[string]string) string
- func ResponseLogger(c *gin.Context)
- func RestoreAsset(dir, name string) error
- func RestoreAssets(dir, name string) error
- func Setup(engine *gin.Engine)
- func ShowGoScopePage(c *gin.Context, rawTemplate string, variables map[string]string)
- func ShowLog(c *gin.Context)
- func ShowRequest(c *gin.Context)
- func UnixTimeToHuman(rawTime int) string
- type BodyLogWriter
- type DetailedRequest
- type DetailedResponse
- type ExceptionRecord
- type LoggerGoScope
- type RecordByUri
- type SummarizedRequest
- type SummarizedResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Asset ¶ added in v1.0.6
Asset loads and returns the asset for the given name. It returns an error if the asset could not be found or could not be loaded.
func AssetDir ¶ added in v1.0.6
AssetDir returns the file names below a certain directory embedded in the file by go-bindata. For example if you run go-bindata on data/... and data contains the following hierarchy:
data/
foo.txt
img/
a.png
b.png
then AssetDir("data") would return []string{"foo.txt", "img"} AssetDir("data/img") would return []string{"a.png", "b.png"} AssetDir("foo.txt") and AssetDir("notexist") would return an error AssetDir("") will return []string{"data"}.
func AssetInfo ¶ added in v1.0.6
AssetInfo loads and returns the asset info for the given name. It returns an error if the asset could not be found or could not be loaded.
func AssetNames ¶ added in v1.0.6
func AssetNames() []string
AssetNames returns the names of the assets. nolint: deadcode
func CheckExcludedPaths ¶
func CheckVariablesAreSet ¶ added in v1.0.4
func CheckVariablesAreSet()
func DumpResponse ¶
func DumpResponse(c *gin.Context, blw *BodyLogWriter, body string)
func GetRequests ¶
func LogDashboard ¶
func MinifyHtml ¶ added in v1.0.6
func MustAsset ¶ added in v1.0.6
MustAsset is like Asset but panics when Asset would return an error. It simplifies safe initialization of global variables. nolint: deadcode
func NavbarComponent ¶ added in v1.0.6
func ResponseLogger ¶
func RestoreAsset ¶ added in v1.0.6
RestoreAsset restores an asset under the given directory
func RestoreAssets ¶ added in v1.0.6
RestoreAssets restores an asset under the given directory recursively
func ShowGoScopePage ¶
func ShowRequest ¶
func UnixTimeToHuman ¶ added in v1.0.4
Types ¶
type BodyLogWriter ¶
type BodyLogWriter struct {
gin.ResponseWriter
// contains filtered or unexported fields
}
type DetailedRequest ¶
type DetailedRequest struct {
Body string `json:"body"`
ClientIp string `json:"client_ip"`
Headers string `json:"headers"`
Host string `json:"host"`
Method string `json:"method"`
Path string `json:"path"`
Referrer string `json:"referrer"`
Time int `json:"time"`
Uid string `json:"uid"`
Url string `json:"url"`
UserAgent string `json:""`
}
func GetDetailedRequest ¶
func GetDetailedRequest(requestUid string) DetailedRequest
type DetailedResponse ¶
type DetailedResponse struct {
Body string `json:"body"`
ClientIp string `json:"client_ip"`
Headers string `json:"headers"`
Path string `json:"path"`
Size int `json:"size"`
Status string `json:"status"`
Time int `json:"time"`
RequestUid string `json:"request_uid"`
Uid string `json:"uid"`
}
func GetDetailedResponse ¶
func GetDetailedResponse(requestUid string) DetailedResponse
type ExceptionRecord ¶
type ExceptionRecord struct {
Error string `json:"error"`
Time int `json:"time"`
Uid string `json:"uid"`
}
func GetDetailedLog ¶
func GetDetailedLog(requestUid string) ExceptionRecord
type LoggerGoScope ¶
type RecordByUri ¶
type RecordByUri struct {
Uid string `uri:"id" binding:"required"`
}