Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Module = fx.Options( fx.Provide(NewUserController), fx.Provide(NewJWTAuthController), fx.Provide(NewEchoController), )
Module exported for initializing application
Functions ¶
Types ¶
type ApiHandler ¶
ApiHandler is a api handler function
type EchoController ¶
type EchoController struct { }
EchoController struct
func NewEchoController ¶
func NewEchoController() *EchoController
NesEchoController creates new controller
func (*EchoController) Echo ¶
func (s *EchoController) Echo(c *gin.Context)
Echo echo user's input param
type JWTAuthController ¶
type JWTAuthController struct {
// contains filtered or unexported fields
}
JWTAuthController struct
func NewJWTAuthController ¶
func NewJWTAuthController( service *services.JWTAuthService, userService *services.UserService, ) *JWTAuthController
NewJWTAuthController creates new controller
func (*JWTAuthController) Register ¶
func (jwt *JWTAuthController) Register(c *gin.Context)
Register registers user
func (*JWTAuthController) SignIn ¶
func (jwt *JWTAuthController) SignIn(c *gin.Context)
SignIn signs in user
type Response ¶
type Response struct { Data interface{} `json:"data"` Code int `json:"code"` Message string `json:"message"` }
Response common api response struct
type UserController ¶
type UserController struct {
// contains filtered or unexported fields
}
UserController data type
func NewUserController ¶
func NewUserController(userService *services.UserService) *UserController
NewUserController creates new user controller
func (*UserController) DeleteUser ¶
func (u *UserController) DeleteUser(c *gin.Context)
DeleteUser deletes user
func (*UserController) GetOneUser ¶
func (u *UserController) GetOneUser(c *gin.Context)
GetOneUser gets one user
func (*UserController) GetUser ¶
func (u *UserController) GetUser(c *gin.Context)
GetUser gets the user
func (*UserController) SaveUser ¶
func (u *UserController) SaveUser(c *gin.Context)
SaveUser saves the user
func (*UserController) UpdateUser ¶
func (u *UserController) UpdateUser(c *gin.Context)
UpdateUser updates user
Click to show internal directories.
Click to hide internal directories.