controller

package
v0.0.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckAdminAuthorization added in v0.0.2

func CheckAdminAuthorization(ctx context.Context, userId int) error

func CreateTraningItem

func CreateTraningItem(c *gin.Context)

func CreateUser added in v0.0.2

func CreateUser(c *gin.Context)

func DeleteTraningItem

func DeleteTraningItem(c *gin.Context)

func DeleteUser added in v0.0.2

func DeleteUser(c *gin.Context)

func GetTraningItem

func GetTraningItem(c *gin.Context)

func GetUser added in v0.0.2

func GetUser(c *gin.Context)

func Handler added in v0.0.2

func ListTraningItem

func ListTraningItem(c *gin.Context)

func ListUsers added in v0.0.2

func ListUsers(c *gin.Context)

func Login added in v0.0.2

func Login(c *gin.Context)

func RegisterRoutes

func RegisterRoutes(r *gin.Engine)

func Run

func Run()

func SampleTraningItem

func SampleTraningItem(c *gin.Context)

func SetCSP added in v0.0.2

func SetCSP(r *gin.Engine)

func SetCors added in v0.0.2

func SetCors(r *gin.Engine)

func UpdateTraningItem

func UpdateTraningItem(c *gin.Context)

func UpdateUser added in v0.0.2

func UpdateUser(c *gin.Context)

func ValidateTokenAndGetUserId added in v0.0.2

func ValidateTokenAndGetUserId(c *gin.Context) (int, error)

Types

type LoginRequest added in v0.0.2

type LoginRequest struct {
	Email    string `json:"email" validate:"required,email"`
	Password string `json:"password" validate:"required,min=8,max=32"`
}

Jump to

Keyboard shortcuts

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