handler

package
v0.0.0-...-7f99631 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decode

func Decode(c *fiber.Ctx) error

func Health

func Health(c *fiber.Ctx) error

func HealthProtected

func HealthProtected(c *fiber.Ctx) error

func Login

func Login(c *fiber.Ctx) error

func Logout

func Logout(c *fiber.Ctx) error

func OTPEmail

func OTPEmail(c *fiber.Ctx) error

func Register

func Register(c *fiber.Ctx) error

func Verify

func Verify(c *fiber.Ctx) error

Types

type AuthResponse

type AuthResponse struct {
	AccessToken  string `json:"access_token"`
	RefreshToken string `json:"refresh_token"`
}

type DecodeResponse

type DecodeResponse struct {
	Name  string `json:"name"`
	Email string `json:"email"`
	Role  string `json:"role"`
}

type LoginPayload

type LoginPayload struct {
	Email    string `json:"email"`
	Password string `json:"password"`
}

type RefreshResponse

type RefreshResponse struct {
	AccessToken string `json:"access_token"`
}

type RegisterPayload

type RegisterPayload struct {
	Name            string `json:"name"`
	Email           string `json:"email"`
	Password        string `json:"password"`
	ConfirmPassword string `json:"confirm_password"`
}

type UserResponse

type UserResponse struct {
	ID        uint      `json:"id"`
	Name      string    `json:"name"`
	Email     string    `json:"email"`
	Role      string    `json:"role"`
	Verified  bool      `json:"verified"`
	CreatedAt time.Time `json:"created_at"`
}

Jump to

Keyboard shortcuts

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