handlers

package
v0.0.0-...-949e8d3 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCurrentUser

func GetCurrentUser(ctx context.Context) (*domain.UserRepoModel, bool)

func SetCurrentUser

func SetCurrentUser(ctx context.Context, user domain.UserRepoModel) error

func ValidationErrorToResponseText

func ValidationErrorToResponseText(err error) string

Types

type Handlers

type Handlers struct {
	// contains filtered or unexported fields
}

func NewHandlers

func NewHandlers(logger *zerolog.Logger, users domain.UsersService, patients domain.PatientService, rgen domain.ReportService, secret string) (*Handlers, error)

func (*Handlers) AnonymousRequired

func (h *Handlers) AnonymousRequired(handler func(http.ResponseWriter, *http.Request)) func(http.ResponseWriter, *http.Request)

func (*Handlers) AuthRequired

func (h *Handlers) AuthRequired(handler func(http.ResponseWriter, *http.Request)) func(http.ResponseWriter, *http.Request)

func (*Handlers) GenerateReportByPatientHandler

func (h *Handlers) GenerateReportByPatientHandler(w http.ResponseWriter, r *http.Request)

func (*Handlers) GetHomeHandler

func (h *Handlers) GetHomeHandler(w http.ResponseWriter, r *http.Request)

func (*Handlers) GetMyAccountsHandler

func (h *Handlers) GetMyAccountsHandler(w http.ResponseWriter, r *http.Request)

func (*Handlers) GetPatientHandler

func (h *Handlers) GetPatientHandler(w http.ResponseWriter, r *http.Request)

func (*Handlers) HandleEditReportPage

func (h *Handlers) HandleEditReportPage(w http.ResponseWriter, r *http.Request)

func (*Handlers) HandleIndex

func (h *Handlers) HandleIndex(w http.ResponseWriter, r *http.Request)

func (*Handlers) NewAiReportForPatient

func (h *Handlers) NewAiReportForPatient(w http.ResponseWriter, r *http.Request)

func (*Handlers) NewReportHandler

func (h *Handlers) NewReportHandler(w http.ResponseWriter, r *http.Request)

func (*Handlers) PostEditReportHandler

func (h *Handlers) PostEditReportHandler(w http.ResponseWriter, r *http.Request)

func (*Handlers) PostLinkAccountHandler

func (h *Handlers) PostLinkAccountHandler(w http.ResponseWriter, r *http.Request)

func (*Handlers) PostLogin

func (h *Handlers) PostLogin(w http.ResponseWriter, r *http.Request)

func (*Handlers) PostLogout

func (h *Handlers) PostLogout(w http.ResponseWriter, r *http.Request)

func (*Handlers) PostNewReportHandler

func (h *Handlers) PostNewReportHandler(w http.ResponseWriter, r *http.Request)

func (*Handlers) PostPatientHandler

func (h *Handlers) PostPatientHandler(w http.ResponseWriter, r *http.Request)

func (*Handlers) PostRegister

func (h *Handlers) PostRegister(w http.ResponseWriter, r *http.Request)

func (*Handlers) ValidateEmail

func (h *Handlers) ValidateEmail(w http.ResponseWriter, r *http.Request)

func (*Handlers) ValidatePassword

func (h *Handlers) ValidatePassword(w http.ResponseWriter, r *http.Request)

func (*Handlers) WithCurrentUser

func (h *Handlers) WithCurrentUser(handler func(http.ResponseWriter, *http.Request)) func(http.ResponseWriter, *http.Request)

func (*Handlers) WithHTMLResponse

func (h *Handlers) WithHTMLResponse(handler func(http.ResponseWriter, *http.Request)) func(http.ResponseWriter, *http.Request)

Jump to

Keyboard shortcuts

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