Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewHealthcheckHandler ¶
func NewHealthcheckHandler(dbServiceAlive serviceUpCheck) http.HandlerFunc
NewHealthcheckHandler creates a HTTP handler for serving a healthcheck endpoint.
func NewTodosHandler ¶
func NewTodosHandler(fetch fetchTodos) http.HandlerFunc
NewTodosHandler creates a HTTP handler for serving a list of todos.
Types ¶
type Endpoints ¶
type Endpoints struct { Healthcheck http.HandlerFunc Todos http.HandlerFunc }
Endpoints specifies the Todo API endpoint configurations as a list of http.Handlers.
type Router ¶
type Router struct {
// contains filtered or unexported fields
}
Router represents a Todo's HTTP router, with the appropriate endpoints configured.
Click to show internal directories.
Click to hide internal directories.