rest

package
v0.0.0-...-990aa43 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 30, 2023 License: MIT Imports: 10 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MyCustomLogger

func MyCustomLogger() gin.HandlerFunc

func RunAPI

func RunAPI(address string) error

func RunAPIWithHandler

func RunAPIWithHandler(address string, h HandlerInterface) error

Types

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

func (*Handler) AddUser

func (h *Handler) AddUser(c *gin.Context)

func (*Handler) Charge

func (h *Handler) Charge(c *gin.Context)

func (*Handler) GetMainPage

func (h *Handler) GetMainPage(c *gin.Context)

func (*Handler) GetOrders

func (h *Handler) GetOrders(c *gin.Context)

func (*Handler) GetProducts

func (h *Handler) GetProducts(c *gin.Context)

func (*Handler) GetPromos

func (h *Handler) GetPromos(c *gin.Context)

func (*Handler) SignIn

func (h *Handler) SignIn(c *gin.Context)

func (*Handler) SignOut

func (h *Handler) SignOut(c *gin.Context)

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)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL