news

package
v0.0.0-...-b197db6 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2024 License: AGPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

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

Jump to

Keyboard shortcuts

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