controllers

package
v0.0.0-...-061a612 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BlackListSet

func BlackListSet(exp int64, accessToken string) error

Redis JWT Token Black List Register

func BookGet

func BookGet(context *gin.Context)

func CreateJWTToken

func CreateJWTToken(username string, userId uint) (map[string]string, error)

jwt token 生成

func CreateUser

func CreateUser(username, password string) (err error)

パスワードをハッシュ化、ユーザー情報を保存する関数

func LoginPost

func LoginPost(context *gin.Context)

ログイン関数 ログイン後にJWT Tokenを発行する

func LogoutGET

func LogoutGET(context *gin.Context)

Logout

func RefreshGET

func RefreshGET(context *gin.Context)

Refresh

func SignupPost

func SignupPost(context *gin.Context)

ユーザー登録関数 request形式はbody json

Types

type Book

type Book struct {
	Title string `json:"title"`
	Tag   string `json:"tag"`
	URL   string `json:"url"`
}

Jump to

Keyboard shortcuts

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