handler

package
v0.0.0-...-3dd14bf Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2022 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Overview

Package handler contains everything related to handle http requests

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewEcho

func NewEcho(h Handler) (e *echo.Echo)

NewEcho build and initialize an instance of *echo.Echo using the Handler passed as parameter

Types

type Handler

type Handler struct {
	TemplateProvider
}

Handler contains all handlers (main handler struct)

func New

func New() *Handler

New returns a empty Handler

type SurveyTemplateProvider

type SurveyTemplateProvider struct {
	business.SurveyProvider
}

SurveyTemplateProvider build html pages for surveys based on a survey template

func (SurveyTemplateProvider) ProvideTemplate

func (sr SurveyTemplateProvider) ProvideTemplate(c echo.Context) error

ProvideTemplate build a html page based on the model.Survey found by id

type TemplateProvider

type TemplateProvider interface {
	// ProvideTemplate handles http requests made to obtain a html template (page)
	ProvideTemplate(echo.Context) error
}

TemplateProvider defines a provider of html templates

Jump to

Keyboard shortcuts

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