Documentation ¶
Index ¶
- func GetCurrentUser(ctx context.Context) (*domain.UserRepoModel, bool)
- func SetCurrentUser(ctx context.Context, user domain.UserRepoModel) error
- func ValidationErrorToResponseText(err error) string
- type Handlers
- func (h *Handlers) AnonymousRequired(handler func(http.ResponseWriter, *http.Request)) func(http.ResponseWriter, *http.Request)
- func (h *Handlers) AuthRequired(handler func(http.ResponseWriter, *http.Request)) func(http.ResponseWriter, *http.Request)
- func (h *Handlers) GenerateReportByPatientHandler(w http.ResponseWriter, r *http.Request)
- func (h *Handlers) GetHomeHandler(w http.ResponseWriter, r *http.Request)
- func (h *Handlers) GetMyAccountsHandler(w http.ResponseWriter, r *http.Request)
- func (h *Handlers) GetPatientHandler(w http.ResponseWriter, r *http.Request)
- func (h *Handlers) HandleEditReportPage(w http.ResponseWriter, r *http.Request)
- func (h *Handlers) HandleIndex(w http.ResponseWriter, r *http.Request)
- func (h *Handlers) NewAiReportForPatient(w http.ResponseWriter, r *http.Request)
- func (h *Handlers) NewReportHandler(w http.ResponseWriter, r *http.Request)
- func (h *Handlers) PostEditReportHandler(w http.ResponseWriter, r *http.Request)
- func (h *Handlers) PostLinkAccountHandler(w http.ResponseWriter, r *http.Request)
- func (h *Handlers) PostLogin(w http.ResponseWriter, r *http.Request)
- func (h *Handlers) PostLogout(w http.ResponseWriter, r *http.Request)
- func (h *Handlers) PostNewReportHandler(w http.ResponseWriter, r *http.Request)
- func (h *Handlers) PostPatientHandler(w http.ResponseWriter, r *http.Request)
- func (h *Handlers) PostRegister(w http.ResponseWriter, r *http.Request)
- func (h *Handlers) ValidateEmail(w http.ResponseWriter, r *http.Request)
- func (h *Handlers) ValidatePassword(w http.ResponseWriter, r *http.Request)
- func (h *Handlers) WithCurrentUser(handler func(http.ResponseWriter, *http.Request)) func(http.ResponseWriter, *http.Request)
- func (h *Handlers) WithHTMLResponse(handler func(http.ResponseWriter, *http.Request)) func(http.ResponseWriter, *http.Request)
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
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) 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)
Click to show internal directories.
Click to hide internal directories.