Documentation ¶ Index ¶ type API func (a *API) HandleRoute(ctx context.Context, path string) (http.Handler, error) func (api *API) Routes() component.Routes type Item func Items() ([]Item, error) type News func (news *News) HandleRoute(ctx context.Context, path string) (http.Handler, error) func (*News) Routes() component.Routes Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ This section is empty. Types ¶ type API ¶ type API struct { component.Base // contains filtered or unexported fields } func (*API) HandleRoute ¶ func (a *API) HandleRoute(ctx context.Context, path string) (http.Handler, error) func (*API) Routes ¶ func (api *API) Routes() component.Routes type Item ¶ type Item struct { ID string Date time.Time Title string Content template.HTML } func Items ¶ func Items() ([]Item, error) Items returns a list of all news items type News ¶ type News struct { component.Base // contains filtered or unexported fields } func (*News) HandleRoute ¶ func (news *News) HandleRoute(ctx context.Context, path string) (http.Handler, error) HandleRoute returns the handler for the requested path func (*News) Routes ¶ func (*News) Routes() component.Routes Source Files ¶ View all Source files api.go news.go Click to show internal directories. Click to hide internal directories.