Documentation
¶
Index ¶
Constants ¶
View Source
const ( UserLocalsKey = "user" ErrNotFoundInCtx = "user not found in context" )
Variables ¶
View Source
var (
ErrStartTimeout = errors.New("start http server timeout")
)
Functions ¶
func ErrorsMiddleware ¶
func TraceMiddleware ¶
Types ¶
type FiberServer ¶
type FiberServer struct {
// contains filtered or unexported fields
}
func NewWithBinder ¶
func NewWithBinder( cfg Config, server *Server, binder Binder, registry prometheus.Registerer, ) *FiberServer
type LoggingData ¶
type LoggingData struct {
TraceID string `json:"traceID"`
RemoteIP string `json:"remoteIP"`
Host string `json:"host"`
Method string `json:"method"`
Path string `json:"path"`
Protocol string `json:"protocol"`
RequestBody string `json:"requestBody"`
ResponseBody string `json:"responseBody"`
StatusCode int `json:"statusCode"`
Latency int64 `json:"latency"`
User any `json:"user"`
Error string `json:"error"`
Stack []byte `json:"stack"`
}
func (*LoggingData) MarshalZerologObject ¶
func (d *LoggingData) MarshalZerologObject(e *zerolog.Event)
type UserNotFoundErr ¶
type UserNotFoundErr struct {
Msg string `json:"msg"`
}
Click to show internal directories.
Click to hide internal directories.