news

package
v0.0.0-...-dae269f Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2023 License: AGPL-3.0 Imports: 18 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
	Dependencies struct {
		Auth *auth.Auth
	}
}

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
	Dependencies struct {
		Templating *templating.Templating
	}
}

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