Documentation
¶
Index ¶
- func ChainMiddleware(fn http.HandlerFunc) http.HandlerFunc
- func JWTProcessorMiddleware(fn http.HandlerFunc) http.HandlerFunc
- func URLProcessorMiddleware(fn http.HandlerFunc) http.HandlerFunc
- type Controller
- func (c *Controller) DashboardValidator(data models.DashboardRequest) bool
- func (c *Controller) HandleRequests(w http.ResponseWriter, r *http.Request)
- func (c *Controller) LoginValidator(data models.LoginRequest) bool
- func (c *Controller) MedicalDataValidator(data models.MedicalDataRequest) bool
- func (c *Controller) PostDashboard(w http.ResponseWriter, r *http.Request, requestData models.DashboardRequest)
- func (c *Controller) RegisterValidator(data models.RegisterRequest) bool
- func (c *Controller) VitalsDataValidator(data models.VitalsRecordRequest) bool
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
Click to show internal directories.
Click to hide internal directories.