Documentation ¶
Index ¶
Constants ¶
View Source
const ( MaxLimit = 1000 DefaultLimit = 100 DefaultOffset = 100 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HTTPServer ¶
type HTTPServer struct { Mux *fiber.App Log *zap.SugaredLogger Routes fiber.Router Config Config }
HTTPServer represents basic REST HTTP server abstarction
func NewServer ¶
func NewServer(config Config) HTTPServer
NewServer returns new HTTP server instance, initializes logger and metrics
func (*HTTPServer) Error ¶
func (s *HTTPServer) Error(c *fiber.Ctx, status int, err error, context ...interface{}) error
Error writes rfc-7807 json problem to response
func (HTTPServer) GetPager ¶
func (s HTTPServer) GetPager(c *fiber.Ctx) Pager
func (HTTPServer) HealthEndpoint ¶
func (s HTTPServer) HealthEndpoint() fiber.Handler
func (*HTTPServer) Init ¶
func (s *HTTPServer) Init()
Init initializes router and setting up basic routes for health and metrics
func (HTTPServer) Run ¶
func (s HTTPServer) Run() error
Run starts listening for incoming connetions
Click to show internal directories.
Click to hide internal directories.