Documentation ¶
Index ¶
- func AuthCheck(c *gin.Context) bool
- func AuthUser(c *gin.Context) (*model.Payload, bool)
- func CsrfField(c *gin.Context) template.HTML
- func CsrfTokenValue(c *gin.Context) string
- func CurrentUser(c *gin.Context) *model.Payload
- func CurrentUserID(c *gin.Context) uint
- func CurrentUserName(c *gin.Context) string
- func Mix(s string) string
- type AuthController
- type ForgotPwdController
- type HomeController
- type ReplyController
- type ThreadController
- func (t *ThreadController) Create(c *gin.Context)
- func (t *ThreadController) Destroy(c *gin.Context)
- func (t *ThreadController) Edit(c *gin.Context)
- func (t *ThreadController) Index(c *gin.Context)
- func (t *ThreadController) Show(c *gin.Context)
- func (t *ThreadController) Store(c *gin.Context)
- func (t *ThreadController) Update(c *gin.Context)
- type UserController
- type WelcomeController
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CurrentUser ¶
CurrentUser return a login user payload data
func CurrentUserName ¶
CurrentUserName return a login user name
Types ¶
type AuthController ¶
type AuthController struct{}
AuthController deal with user auth
func (*AuthController) Create ¶
func (a *AuthController) Create(c *gin.Context)
Create deal with user Create
func (*AuthController) Login ¶
func (a *AuthController) Login(c *gin.Context)
Login deal with user login
func (*AuthController) Logout ¶
func (a *AuthController) Logout(c *gin.Context)
Logout deal with user Logout
func (*AuthController) ShowLoginPage ¶
func (a *AuthController) ShowLoginPage(c *gin.Context)
ShowLoginPage return login page
func (*AuthController) Store ¶
func (a *AuthController) Store(c *gin.Context)
Store deal with user Store
type ForgotPwdController ¶
type ForgotPwdController struct{}
ForgotPwdController deal with user password
func (*ForgotPwdController) ResetPassword ¶
func (f *ForgotPwdController) ResetPassword(c *gin.Context)
ResetPassword to reset current user password
func (*ForgotPwdController) SendResetLinkEmail ¶
func (f *ForgotPwdController) SendResetLinkEmail(c *gin.Context)
SendResetLinkEmail send a reset password email
func (*ForgotPwdController) ShowRequestPage ¶
func (f *ForgotPwdController) ShowRequestPage(c *gin.Context)
ShowRequestPage return request page
func (*ForgotPwdController) ShowResetPage ¶
func (f *ForgotPwdController) ShowResetPage(c *gin.Context)
ShowResetPage show reset page
type HomeController ¶
type HomeController struct{}
HomeController user home page
func (*HomeController) Index ¶
func (h *HomeController) Index(c *gin.Context)
Index return user Home page
type ReplyController ¶
type ReplyController struct{}
ReplyController deal with thread replies
func (*ReplyController) Store ¶
func (r *ReplyController) Store(c *gin.Context)
Store store a thread reply
type ThreadController ¶
type ThreadController struct{}
ThreadController deal with thread
func (*ThreadController) Create ¶
func (t *ThreadController) Create(c *gin.Context)
Create return thread create page
func (*ThreadController) Destroy ¶
func (t *ThreadController) Destroy(c *gin.Context)
Destroy a thread form request
func (*ThreadController) Edit ¶
func (t *ThreadController) Edit(c *gin.Context)
Edit a thread form request
func (*ThreadController) Index ¶
func (t *ThreadController) Index(c *gin.Context)
Index get All Threads
func (*ThreadController) Store ¶
func (t *ThreadController) Store(c *gin.Context)
Store a thread form request
func (*ThreadController) Update ¶
func (t *ThreadController) Update(c *gin.Context)
Update a thread form request
type UserController ¶
type UserController struct{}
UserController return home page
func (*UserController) Show ¶
func (u *UserController) Show(c *gin.Context)
Show return user Home page
type WelcomeController ¶
type WelcomeController struct{}
WelcomeController welcome
func (*WelcomeController) Index ¶
func (w *WelcomeController) Index(c *gin.Context)
Index Welcome page