Documentation ¶
Index ¶
- func HandlerFromMux(si ServerInterface, e *gin.Engine) http.Handler
- type HTTPServer
- func (h *HTTPServer) AddOrder() func(ctx *gin.Context)
- func (h *HTTPServer) AddRefund() func(ctx *gin.Context)
- func (h *HTTPServer) AddTopUp() func(ctx *gin.Context)
- func (h *HTTPServer) GetHealthStatus() func(ctx *gin.Context)
- func (h *HTTPServer) GetOrder() func(ctx *gin.Context)
- func (h *HTTPServer) PayOrder() func(ctx *gin.Context)
- func (*HTTPServer) RespondWithError(ctx *gin.Context, err error)
- func (*HTTPServer) RespondWithOK(ctx *gin.Context, resp interface{})
- type ServerInterface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HandlerFromMux ¶
func HandlerFromMux(si ServerInterface, e *gin.Engine) http.Handler
Types ¶
type HTTPServer ¶
type HTTPServer struct {
// contains filtered or unexported fields
}
func NewHTTPServer ¶
func (*HTTPServer) AddOrder ¶
func (h *HTTPServer) AddOrder() func(ctx *gin.Context)
func (*HTTPServer) AddRefund ¶
func (h *HTTPServer) AddRefund() func(ctx *gin.Context)
func (*HTTPServer) AddTopUp ¶
func (h *HTTPServer) AddTopUp() func(ctx *gin.Context)
func (*HTTPServer) GetHealthStatus ¶
func (h *HTTPServer) GetHealthStatus() func(ctx *gin.Context)
func (*HTTPServer) GetOrder ¶
func (h *HTTPServer) GetOrder() func(ctx *gin.Context)
func (*HTTPServer) PayOrder ¶
func (h *HTTPServer) PayOrder() func(ctx *gin.Context)
func (*HTTPServer) RespondWithError ¶
func (*HTTPServer) RespondWithError(ctx *gin.Context, err error)
func (*HTTPServer) RespondWithOK ¶
func (*HTTPServer) RespondWithOK(ctx *gin.Context, resp interface{})
type ServerInterface ¶
type ServerInterface interface { // GET /health GetHealthStatus() func(*gin.Context) // GET /v1/order/:id GetOrder() func(*gin.Context) // POST /v1/order/ AddOrder() func(*gin.Context) // POST /v1/order/:id/pay PayOrder() func(*gin.Context) // POST /v1/order/:id/refund AddRefund() func(*gin.Context) // POST /v1/user/{id}/topup AddTopUp() func(*gin.Context) }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.