Documentation
¶
Index ¶
Constants ¶
View Source
const ( // The amount of files in the stack to be retrieved. StackDepth = 200 // How many files to move up in the runtime.Caller // before obtaining the stack. StackSkip = 2 )
View Source
const ( // TplPrefix defines the prefix for template searching // such as "errors-500.html". TplPrefix = "error" // The extension of the web error file. VerbisErrorExtension = ".html" // The main layout of the web error file. VerbisErrorLayout = "layouts/main" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Code int Context *gin.Context Error interface{} TplFile string TplExec tpl.TemplateExecutor Post *domain.PostDatum }
Config defines
type Data ¶
type Data struct { Error Error StatusCode int Request Request Post *domain.PostDatum Stack trace.Stack Context Context Debug bool }
Data represents the main struct for sending back data to the template for recovery.
type Error ¶
Error represents a errors.Error in friendly form (strings) to for the recovery template.
type Recovery ¶
type Recovery interface { Recover(cfg Config) []byte HttpRecovery() gin.HandlerFunc }
type Request ¶
type Request struct { URL string Method string IP string Referer string DataLength int Body string Headers map[string][]string Query map[string][]string Cookies []*http.Cookie }
Request represents the data obtained from the context with detailed information about the http request made.
Click to show internal directories.
Click to hide internal directories.