controllers

package
v0.0.0-...-7891df5 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2021 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ChainMiddleware

func ChainMiddleware(fn http.HandlerFunc) http.HandlerFunc

func JWTProcessorMiddleware

func JWTProcessorMiddleware(fn http.HandlerFunc) http.HandlerFunc

func URLProcessorMiddleware

func URLProcessorMiddleware(fn http.HandlerFunc) http.HandlerFunc

Middleware will split the full URL path into slash-sperated parts and save to the context to flow downstream in the app for this particular request.

Types

type Controller

type Controller struct {
	UserRepo      models.UserRepo
	DashboardRepo models.DashboardRepo
	MedicalRepo   models.MedicalRepo
	VitalsRepo    models.VitalsRepo
	// contains filtered or unexported fields
}

func New

func New(db *sql.DB) *Controller

func (*Controller) DashboardValidator

func (c *Controller) DashboardValidator(data models.DashboardRequest) bool

func (*Controller) HandleRequests

func (c *Controller) HandleRequests(w http.ResponseWriter, r *http.Request)

func (*Controller) LoginValidator

func (c *Controller) LoginValidator(data models.LoginRequest) bool

func (*Controller) MedicalDataValidator

func (c *Controller) MedicalDataValidator(data models.MedicalDataRequest) bool

func (*Controller) PostDashboard

func (c *Controller) PostDashboard(w http.ResponseWriter, r *http.Request, requestData models.DashboardRequest)

func (*Controller) RegisterValidator

func (c *Controller) RegisterValidator(data models.RegisterRequest) bool

func (*Controller) VitalsDataValidator

func (c *Controller) VitalsDataValidator(data models.VitalsRecordRequest) bool

Jump to

Keyboard shortcuts

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