handler

package
v0.0.0-...-782ee41 Latest Latest
Warning

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

Go to latest
Published: May 11, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateToken

func CreateToken(conf *config.Config, user model.User) (string, error)

Types

type CreateUserResponse

type CreateUserResponse struct {
	Token string `json:"token,omitempty"`
}

type Handler

type Handler interface {
	CreateUser(c *gin.Context)
	GetUsers(c *gin.Context)
	GetUser(c *gin.Context)
	UpdateUser(c *gin.Context)
	DeleteUser(c *gin.Context)

	CreateTask(c *gin.Context)
	GetTasks(c *gin.Context)
	GetTask(c *gin.Context)
	UpdateTask(c *gin.Context)
	DeleteTask(c *gin.Context)
}

func InitHandler

func InitHandler(db *sqlx.DB, conf config.Config) Handler

type JWTCustomClaims

type JWTCustomClaims struct {
	Email string `json:"email"`
	jwt.RegisteredClaims
}

func GetClaim

func GetClaim(c *gin.Context) *JWTCustomClaims

Jump to

Keyboard shortcuts

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