Skip to content

Instantly share code, notes, and snippets.

@dipeshhkc
Last active May 22, 2021 10:32
Show Gist options
  • Save dipeshhkc/051da1f88cd0ba655b5eecc1e1470fd5 to your computer and use it in GitHub Desktop.
Save dipeshhkc/051da1f88cd0ba655b5eecc1e1470fd5 to your computer and use it in GitHub Desktop.
package handler
type UserHandler interface {
AddUser(*gin.Context)
GetUser(*gin.Context)
GetAllUser(*gin.Context)
SignInUser(*gin.Context)
UpdateUser(*gin.Context)
DeleteUser(*gin.Context)
GetProductOrdered(*gin.Context)
}
type userHandler struct {
repo repository.UserRepository
}
func NewUserHandler() UserHandler {
return &userHandler{
repo: repository.NewUserRepository(),
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment