handler

package
v0.0.0-...-155fe22 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

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

Handler holds the configurations and database connection so that all handlers can have access to them in 1 place.

func NewHandler

func NewHandler(cfg *config.Config, db *sqlx.DB) *Handler

NewHandler returns a new Handler.

func (*Handler) Config

func (h *Handler) Config(c echo.Context) error

Config is the handler for `/config` endpoint.

func (*Handler) CreateGoal

func (h *Handler) CreateGoal(c echo.Context) error

CreateGoal creates a goal in the system.

func (*Handler) CreateProgress

func (h *Handler) CreateProgress(c echo.Context) error

CreateProgress create a progress in the system.

func (*Handler) CreateSystem

func (h *Handler) CreateSystem(c echo.Context) error

CreateSystem create a system in the system.

func (*Handler) DeleteGoal

func (h *Handler) DeleteGoal(c echo.Context) error

DeleteGoal deletes a specified goal in the system.

func (*Handler) DeleteProgress

func (h *Handler) DeleteProgress(c echo.Context) error

DeleteProgress deletes a specified progress in the system.

func (*Handler) DeleteSystem

func (h *Handler) DeleteSystem(c echo.Context) error

DeleteSystem deletes a specified system in the system.

func (*Handler) GetGoal

func (h *Handler) GetGoal(c echo.Context) error

GetGoal gets a specified goal in the system.

func (*Handler) GetGoals

func (h *Handler) GetGoals(c echo.Context) error

GetGoals gets all goals in the system.

func (*Handler) GetProgress

func (h *Handler) GetProgress(c echo.Context) error

GetProgress gets a specified progress in the system.

func (*Handler) GetProgresses

func (h *Handler) GetProgresses(c echo.Context) error

GetProgresses gets all progress in the system.

func (*Handler) GetSystem

func (h *Handler) GetSystem(c echo.Context) error

GetSystem gets a specified system in the system.

func (*Handler) GetSystems

func (h *Handler) GetSystems(c echo.Context) error

GetSystems gets all systems in the system.

func (*Handler) Health

func (h *Handler) Health(c echo.Context) error

Health is the handler for `/health` endpoint.

func (*Handler) UpdateGoal

func (h *Handler) UpdateGoal(c echo.Context) error

UpdateGoal updates a specified goal in the system.

func (*Handler) UpdateProgress

func (h *Handler) UpdateProgress(c echo.Context) error

UpdateProgress updates a specified progress in the system.

func (*Handler) UpdateSystem

func (h *Handler) UpdateSystem(c echo.Context) error

UpdateSystem updates a specified system in the system.

Jump to

Keyboard shortcuts

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