Documentation ¶
Overview ¶
License: MIT Authors:
- Josep Bigorra (averageflow)
License: MIT Authors:
- Josep Bigorra (averageflow)
License: MIT Authors:
- Josep Bigorra (averageflow)
License: MIT Authors:
- Josep Bigorra (averageflow)
License: MIT Authors:
- Josep Bigorra (averageflow)
Index ¶
- Constants
- 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 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 SearchLog(c *gin.Context)
- func SearchRequest(c *gin.Context)
- 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 ShowSystemInfo(c *gin.Context)
- func UnixTimeToHuman(rawTime int) string
- type BodyLogWriter
- type DetailedRequest
- type DetailedResponse
- type ExceptionRecord
- type LoggerGoScope
- type RecordByUri
- type SearchRequestPayload
- type SummarizedRequest
- type SummarizedResponse
Constants ¶
const (
BytesInOneGigabyte = 1073741824
)
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 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 SearchRequest ¶ added in v1.1.0
func ShowGoScopePage ¶
func ShowRequest ¶
func ShowSystemInfo ¶ added in v1.1.2
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
func SearchLogs ¶ added in v1.1.0
func SearchLogs(searchString string, offset int) []ExceptionRecord
type LoggerGoScope ¶
type RecordByUri ¶
type RecordByUri struct {
Uid string `uri:"id" binding:"required"`
}
type SearchRequestPayload ¶ added in v1.1.0
type SearchRequestPayload struct {
Query string `json:"query"`
}
type SummarizedRequest ¶
type SummarizedRequest struct { Method string `json:"method"` Path string `json:"path"` Time int `json:"time"` Uid string `json:"uid"` ResponseStatus int `json:"response_status"` }
func SearchRequests ¶ added in v1.1.0
func SearchRequests(searchString string, offset int) []SummarizedRequest