server

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 28, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

package server implements the HTTP handler that parses the road alert feed and populates the HTML template based on the closure information.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHandler

func NewHandler(opts *Options) (http.Handler, error)

NewHandler returns an http.Handler for

Types

type Options

type Options struct {
	FeedURL  string
	Road     string
	Timezone string
}

Options specifies the feed URL for road alerts, the road to check for closures in those alerts, and the timezone in which to display time to the user. FeedURL and Road are required. Timezone defaults to UTC.

Jump to

Keyboard shortcuts

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