Documentation ¶
Index ¶
- type GracefullyShutDown
- type LoggerHandler
- type ResponseHandler
- func (rh *ResponseHandler) RespondWithAuthorized(data interface{}, w http.ResponseWriter)
- func (rh *ResponseHandler) RespondWithBadRequest(data interface{}, w http.ResponseWriter)
- func (rh *ResponseHandler) RespondWithInternalServerError(data interface{}, w http.ResponseWriter)
- func (rh *ResponseHandler) RespondWithSuccess(data interface{}, w http.ResponseWriter)
- func (rh *ResponseHandler) RespondWithUnauthorized(data interface{}, w http.ResponseWriter)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GracefullyShutDown ¶
type GracefullyShutDown struct {
// contains filtered or unexported fields
}
func NewGracefullyShutDown ¶
func NewGracefullyShutDown(h http.Handler, address string) *GracefullyShutDown
func (*GracefullyShutDown) RunGracefully ¶
func (r *GracefullyShutDown) RunGracefully()
type LoggerHandler ¶
type LoggerHandler struct{}
func (*LoggerHandler) LogAccess ¶
func (*LoggerHandler) LogAccess(format string, v ...interface{})
LogAccess is print messages to log.
func (*LoggerHandler) LogError ¶
func (*LoggerHandler) LogError(format string, v ...interface{})
LogError is print messages to log.
func (*LoggerHandler) Open ¶
func (l *LoggerHandler) Open()
type ResponseHandler ¶
type ResponseHandler struct{}
func NewResponseHandler ¶
func NewResponseHandler() *ResponseHandler
func (*ResponseHandler) RespondWithAuthorized ¶
func (rh *ResponseHandler) RespondWithAuthorized(data interface{}, w http.ResponseWriter)
func (*ResponseHandler) RespondWithBadRequest ¶
func (rh *ResponseHandler) RespondWithBadRequest(data interface{}, w http.ResponseWriter)
func (*ResponseHandler) RespondWithInternalServerError ¶
func (rh *ResponseHandler) RespondWithInternalServerError(data interface{}, w http.ResponseWriter)
func (*ResponseHandler) RespondWithSuccess ¶
func (rh *ResponseHandler) RespondWithSuccess(data interface{}, w http.ResponseWriter)
func (*ResponseHandler) RespondWithUnauthorized ¶
func (rh *ResponseHandler) RespondWithUnauthorized(data interface{}, w http.ResponseWriter)
Click to show internal directories.
Click to hide internal directories.