handler

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CORS

func CORS(next http.Handler) http.Handler

Types

type CreateRequest

type CreateRequest struct {
	Date          string `json:"date"`
	RaceType      string `json:"type"`
	WeeklyMileage int    `json:"weeklyMileage"`
	BackToBacks   bool   `json:"backToBacks"`
	RestDays      int    `json:"restDays"`
}

type Handler

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

func NewHandler

func NewHandler(service s.ScheduleService) *Handler

func (*Handler) CreateIcal

func (h *Handler) CreateIcal(w http.ResponseWriter, r *http.Request)

func (*Handler) CreateSchedule

func (h *Handler) CreateSchedule(w http.ResponseWriter, r *http.Request)

func (*Handler) FileServer

func (h *Handler) FileServer(r chi.Router, path string, root http.FileSystem)

FileServer conveniently sets up a http.FileServer handler to serve static files from a http.FileSystem.

func (*Handler) HealthHandler

func (h *Handler) HealthHandler(w http.ResponseWriter, r *http.Request)

func (*Handler) NewRouter

func (h *Handler) NewRouter() *chi.Mux

func (*Handler) ReadinessHandler

func (h *Handler) ReadinessHandler(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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