controller

package
v0.0.0-...-263fddb Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2019 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AuthCheck

func AuthCheck(c *gin.Context) bool

AuthCheck return bool

func AuthUser

func AuthUser(c *gin.Context) (*model.Payload, bool)

AuthUser return a login user payload data

func CsrfField

func CsrfField(c *gin.Context) template.HTML

CsrfField return a input contains csrf_token

func CsrfTokenValue

func CsrfTokenValue(c *gin.Context) string

CsrfTokenValue return csrf_token

func CurrentUser

func CurrentUser(c *gin.Context) *model.Payload

CurrentUser return a login user payload data

func CurrentUserID

func CurrentUserID(c *gin.Context) uint

CurrentUserID return a login user ID

func CurrentUserName

func CurrentUserName(c *gin.Context) string

CurrentUserName return a login user name

func Mix

func Mix(s string) string

Mix Get the path to a versioned Mix file.

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) Show

func (t *ThreadController) Show(c *gin.Context)

Show a Thread

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

Jump to

Keyboard shortcuts

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