Documentation
¶
Index ¶
Constants ¶
View Source
const ( LogTimeFormat = "01/Jan/2006:15:04:05 -0700" RequestContextKey = "github.com/pshgo/cmd/serve/middleware/RequestContextKey" )
View Source
const (
LogContextKey = "github.com/demosdemon/pshgo/cmd/serve/middleware/LogContextKey"
)
Variables ¶
View Source
var Gzip = middleware.Gzip
Functions ¶
func NewRequest ¶
Types ¶
type LogContext ¶
type LogContext interface {
Log() Logger
}
type PanicHandler ¶
type Request ¶
type Request struct { Start time.Time `json:"start"` ID string `json:"id"` Username string `json:"username,omitempty"` ClientIP string `json:"client_ip"` RemoteAddr string `json:"remote_addr"` Method string `json:"method"` URL string `json:"url"` Proto string `json:"proto"` Referrer string `json:"referrer,omitempty"` UserAgent string `json:"user_agent"` Host string `json:"host"` Headers map[string]string `json:"headers"` Delay pshgo.Duration `json:"delay,omitempty"` Status int `json:"status,omitempty"` Size int64 `json:"size,omitempty"` Panic *cpanic.Panic `json:"panic,omitempty"` }
func (*Request) UpdateLARS ¶
Update returns a new Request object with fields updated from the lars response.
Click to show internal directories.
Click to hide internal directories.