Documentation
¶
Index ¶
- func GetCorrelationID(ctx *gin.Context) string
- func GetLoggerFromGinContext(ctx *gin.Context) (*log.Entry, error)
- func GetRequestID(ctx *gin.Context) string
- type HttpRequestMetric
- type HttpServer
- func (hs *HttpServer) Reply(ctx *gin.Context, body interface{})
- func (hs *HttpServer) ReplyWithError(ctx *gin.Context, err error)
- func (hs *HttpServer) RequireCorrelationID(ctx *gin.Context)
- func (hs *HttpServer) RequireRequestID(ctx *gin.Context)
- func (hs *HttpServer) Run() error
- func (hs *HttpServer) SessionDelete(c *gin.Context, key string) error
- func (hs *HttpServer) SessionGet(c *gin.Context, key string) (interface{}, bool)
- func (hs *HttpServer) SessionSet(c *gin.Context, key string, value interface{}) error
- type InternalServerError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetCorrelationID ¶ added in v0.2.2
func GetLoggerFromGinContext ¶ added in v0.2.2
func GetRequestID ¶ added in v0.2.2
Types ¶
type HttpRequestMetric ¶ added in v0.2.3
type HttpServer ¶
type HttpServer struct {
Gin *gin.Engine
Env env.Environment
// contains filtered or unexported fields
}
func NewHttpServer ¶
func NewHttpServer(env env.Environment, config *HttpConfig.HttpServerConfig) (*HttpServer, error)
func (*HttpServer) Reply ¶
func (hs *HttpServer) Reply(ctx *gin.Context, body interface{})
func (*HttpServer) ReplyWithError ¶
func (hs *HttpServer) ReplyWithError(ctx *gin.Context, err error)
func (*HttpServer) RequireCorrelationID ¶
func (hs *HttpServer) RequireCorrelationID(ctx *gin.Context)
func (*HttpServer) RequireRequestID ¶
func (hs *HttpServer) RequireRequestID(ctx *gin.Context)
func (*HttpServer) Run ¶
func (hs *HttpServer) Run() error
func (*HttpServer) SessionDelete ¶ added in v0.2.11
func (hs *HttpServer) SessionDelete(c *gin.Context, key string) error
func (*HttpServer) SessionGet ¶ added in v0.2.11
func (hs *HttpServer) SessionGet(c *gin.Context, key string) (interface{}, bool)
func (*HttpServer) SessionSet ¶ added in v0.2.11
func (hs *HttpServer) SessionSet(c *gin.Context, key string, value interface{}) error
type InternalServerError ¶ added in v0.2.11
type InternalServerError struct {
AdditionalData interface{}
}
MARK: Internal Server Error
func (*InternalServerError) Error ¶ added in v0.2.11
func (e *InternalServerError) Error() string
func (*InternalServerError) RestCode ¶ added in v0.2.11
func (e *InternalServerError) RestCode() int
func (*InternalServerError) Unwrap ¶ added in v0.2.11
func (e *InternalServerError) Unwrap() error
Source Files
¶
Click to show internal directories.
Click to hide internal directories.