Documentation
¶
Index ¶
- type CustomerController
- func (uc CustomerController) AddFavorites(c *gin.Context)
- func (uc CustomerController) CreateCustomer(c *gin.Context)
- func (uc CustomerController) CustomerList(c *gin.Context)
- func (uc CustomerController) GetCustomer(c *gin.Context)
- func (uc CustomerController) RemoveCustomer(c *gin.Context)
- func (uc CustomerController) UpdateCustomer(c *gin.Context)
- type JsonResponse
- type JwtController
- type ProductController
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CustomerController ¶
type CustomerController struct {
// contains filtered or unexported fields
}
func NewCustomerController ¶
func NewCustomerController(s *mgo.Session) *CustomerController
func (CustomerController) AddFavorites ¶
func (uc CustomerController) AddFavorites(c *gin.Context)
func (CustomerController) CreateCustomer ¶
func (uc CustomerController) CreateCustomer(c *gin.Context)
func (CustomerController) CustomerList ¶
func (uc CustomerController) CustomerList(c *gin.Context)
func (CustomerController) GetCustomer ¶
func (uc CustomerController) GetCustomer(c *gin.Context)
func (CustomerController) RemoveCustomer ¶
func (uc CustomerController) RemoveCustomer(c *gin.Context)
func (CustomerController) UpdateCustomer ¶
func (uc CustomerController) UpdateCustomer(c *gin.Context)
type JsonResponse ¶
type JsonResponse struct {
Success bool `json:"success"`
Data interface{} `json:"data"`
Total int `json:"total"`
Error interface{} `json:"error"`
}
func Response ¶
func Response(data interface{}, success bool, count int, errors interface{}) JsonResponse
type JwtController ¶
type JwtController struct {
// contains filtered or unexported fields
}
func NewAuthController ¶
func NewAuthController(cacheClient *cache.Cache, session *mgo.Session) *JwtController
func (JwtController) GenarateNewToken ¶
func (ac JwtController) GenarateNewToken(resource string) string
func (JwtController) RefreshToken ¶
func (ac JwtController) RefreshToken(c *gin.Context)
type ProductController ¶
type ProductController struct {
// contains filtered or unexported fields
}
func NewProductController ¶
func NewProductController(s *mgo.Session) *ProductController
func (ProductController) CreateProduct ¶
func (uc ProductController) CreateProduct(c *gin.Context)
func (ProductController) GetProduct ¶
func (uc ProductController) GetProduct(c *gin.Context)
func (ProductController) ProductList ¶
func (uc ProductController) ProductList(c *gin.Context)
func (ProductController) RemoveProduct ¶
func (uc ProductController) RemoveProduct(c *gin.Context)
func (ProductController) UpdateProduct ¶
func (uc ProductController) UpdateProduct(c *gin.Context)
Click to show internal directories.
Click to hide internal directories.