Documentation ¶
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 GetAppName(c *gin.Context)
- func GetMimeType(filename string) string
- func GetStaticFile(c *gin.Context)
- func LogList(c *gin.Context)
- func MustAsset(name string) []byte
- func NoRouteResponseLogger(c *gin.Context)
- func RequestList(c *gin.Context)
- func ResponseLogger(c *gin.Context)
- func RestoreAsset(dir, name string) error
- func RestoreAssets(dir, name string) error
- func SearchLog(c *gin.Context)
- func SearchLogOptions(c *gin.Context)
- func SearchRequest(c *gin.Context)
- func SearchRequestOptions(c *gin.Context)
- func Setup(router *gin.Engine, goScopeGroup *gin.RouterGroup)
- func ShowDashboard(c *gin.Context)
- func ShowLog(c *gin.Context)
- func ShowRequest(c *gin.Context)
- func ShowSystemInfo(c *gin.Context)
- type BodyLogWriter
- type BodyLogWriterResponse
- type DetailedRequest
- type DetailedResponse
- type ExceptionRecord
- type LoggerGoScope
- type RecordByURI
- type SearchRequestPayload
- type SummarizedRequest
- type SummarizedResponse
- type SystemInformationResponse
- type SystemInformationResponseCPU
- type SystemInformationResponseDisk
- type SystemInformationResponseHost
- type SystemInformationResponseMemory
Constants ¶
const ( BytesInOneGigabyte = 1073741824 SecondsInOneMinute = 60 )
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 ¶
Check the wanted path is not in the do not log list.
func GetAppName ¶ added in v1.2.0
func GetMimeType ¶ added in v1.3.1
Get the mime type of a file by its name.
func GetStaticFile ¶ added in v1.2.0
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 NoRouteResponseLogger ¶ added in v1.7.2
func RequestList ¶ added in v1.2.0
func ResponseLogger ¶
Log an HTTP response to the DB and print to Stdout.
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 SearchLogOptions ¶ added in v1.2.0
func SearchRequest ¶ added in v1.1.0
func SearchRequestOptions ¶ added in v1.2.0
func ShowDashboard ¶ added in v1.1.6
func ShowRequest ¶
func ShowSystemInfo ¶ added in v1.1.2
Show system information of the current host.
Types ¶
type BodyLogWriter ¶
type BodyLogWriter struct { gin.ResponseWriter // contains filtered or unexported fields }
type BodyLogWriterResponse ¶ added in v1.7.2
type BodyLogWriterResponse struct { Blw *BodyLogWriter Rdr io.ReadCloser }
func ObtainBodyLogWriter ¶ added in v1.7.2
func ObtainBodyLogWriter(c *gin.Context) BodyLogWriterResponse
type DetailedRequest ¶
type DetailedRequest struct { Body string `json:"body"` ClientIP string `json:"clientIP"` 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:"userAgent"` }
func GetDetailedRequest ¶
func GetDetailedRequest(requestUID string) DetailedRequest
Get all details from a request via its UID.
type DetailedResponse ¶
type DetailedResponse struct { Body string `json:"body"` ClientIP string `json:"clientIP"` Headers string `json:"headers"` Path string `json:"path"` Size int `json:"size"` Status string `json:"status"` Time int `json:"time"` RequestUID string `json:"requestUID"` 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 GetLogs ¶
func GetLogs(offset int) []ExceptionRecord
Get a summarized list of application logs from the DB.
func SearchLogs ¶ added in v1.1.0
func SearchLogs(searchString string, offset int) []ExceptionRecord
type LoggerGoScope ¶
type RecordByURI ¶ added in v1.1.6
type RecordByURI struct {
UID string `uri:"id" binding:"required"`
}
type SearchRequestPayload ¶ added in v1.1.0
type SearchRequestPayload struct { Query string `json:"query"` Filter database.RequestFilter `json:"filter"` }
type SummarizedRequest ¶
type SummarizedRequest struct { Method string `json:"method"` Path string `json:"path"` Time int `json:"time"` UID string `json:"uid"` ResponseStatus int `json:"responseStatus"` }
func GetRequests ¶
func GetRequests(offset int) []SummarizedRequest
func SearchRequests ¶ added in v1.1.0
func SearchRequests(search string, filter *database.RequestFilter, offset int) []SummarizedRequest
type SummarizedResponse ¶
type SystemInformationResponse ¶ added in v1.3.8
type SystemInformationResponse struct { ApplicationName string `json:"applicationName"` CPU SystemInformationResponseCPU `json:"cpu"` Disk SystemInformationResponseDisk `json:"disk"` Host SystemInformationResponseHost `json:"host"` Memory SystemInformationResponseMemory `json:"memory"` }