Documentation ¶
Index ¶
- Constants
- func DecodeRequest(r *http.Request, contentType string, v interface{}) (err error)
- func EncodeResponse(w http.ResponseWriter, contentType string, v proto.Message) (err error)
- func GenerateAwesomeData(r *http.Request, log *logrus.Entry) (logger *logrus.Entry, ctx context.Context)
- func HealthCheck(next http.Handler) http.Handler
- func Limit(next http.Handler) http.Handler
- func Recovery(next http.Handler) http.Handler
- func Timeout(next http.Handler) http.Handler
- type Server
- type ServerOption
Constants ¶
View Source
const (
Version = "0.0.1"
)
Variables ¶
This section is empty.
Functions ¶
func DecodeRequest ¶
func EncodeResponse ¶
func GenerateAwesomeData ¶
Types ¶
type Server ¶
func NewServer ¶
func NewServer(app string, opts ...ServerOption) *Server
func (*Server) SetHandler ¶
type ServerOption ¶
type ServerOption func(o *Server)
func Logger ¶
func Logger(logger *logrus.Entry) ServerOption
func Prometheus ¶
func Prometheus(enableHandlingTimeHistogram bool) ServerOption
func ReadTimeout ¶
func ReadTimeout(timeout time.Duration) ServerOption
Timeout with server timeout.
Click to show internal directories.
Click to hide internal directories.