restapi

package
v0.0.0-...-cfcd8fe Latest Latest
Warning

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

Go to latest
Published: May 8, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewGracefullyShutdown

func NewGracefullyShutdown(log logger.Logger, handler http.Handler, address string) framework.ControllerStarter

func NewHandler

func NewHandler(appData framework.ApplicationData, log logger.Logger, jwt token.JWT, cfg *configs.Config, userService service.UserService) *handler

Types

type LoginRequest

type LoginRequest struct {
	Email    string `json:"email" validate:"required,email"`
	Password string `json:"password" validate:"required"`
}

type RefreshTokenRequest

type RefreshTokenRequest struct {
	RefreshToken string `json:"refresh_token" validate:"required"`
	CsrfSecret   string `json:"csrf_secret" validate:"required"`
}

type RegisterRequest

type RegisterRequest struct {
	FirstName string `json:"first_name"`
	LastName  string `json:"last_name" validate:"required"`
	Email     string `json:"email" validate:"required,email"`
	Password  string `json:"password" validate:"required,min=5"`
}

Jump to

Keyboard shortcuts

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