Documentation ¶
Index ¶
- func MyCustomLogger() gin.HandlerFunc
- func RunAPI(address string) error
- func RunAPIWithHandler(address string, h HandlerInterface) error
- type Handler
- func (h *Handler) AddUser(c *gin.Context)
- func (h *Handler) Charge(c *gin.Context)
- func (h *Handler) GetMainPage(c *gin.Context)
- func (h *Handler) GetOrders(c *gin.Context)
- func (h *Handler) GetProducts(c *gin.Context)
- func (h *Handler) GetPromos(c *gin.Context)
- func (h *Handler) SignIn(c *gin.Context)
- func (h *Handler) SignOut(c *gin.Context)
- type HandlerInterface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MyCustomLogger ¶
func MyCustomLogger() gin.HandlerFunc
func RunAPIWithHandler ¶
func RunAPIWithHandler(address string, h HandlerInterface) error
Types ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
func (*Handler) GetMainPage ¶
func (*Handler) GetProducts ¶
type HandlerInterface ¶
type HandlerInterface interface { GetMainPage(c *gin.Context) GetProducts(c *gin.Context) GetPromos(c *gin.Context) AddUser(c *gin.Context) SignIn(c *gin.Context) SignOut(c *gin.Context) GetOrders(c *gin.Context) Charge(c *gin.Context) }
func NewHandler ¶
func NewHandler() (HandlerInterface, error)
func NewHandlerWithDB ¶
func NewHandlerWithDB(db dblayer.DBLayer) HandlerInterface
func NewHandlerWithParams ¶
func NewHandlerWithParams(dbtype, conn string) (HandlerInterface, error)
Click to show internal directories.
Click to hide internal directories.