site

package
v0.0.0-...-9ed1330 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2021 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package site define HTTP handlers.

Index

Constants

View Source
const VERSION = "v1.0.0-DEV (master)"

VERSION is what version of campwiz we advertise as.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	BaseDirectory string
	Cache         cache.Store
	Sources       map[string]campwiz.Source
	Properties    map[string]*campwiz.Property
	Providers     []string

	// For hardcoding a site to a particular address
	Latitude  float64
	Longitude float64
}

Config is how external users interact with this package.

type Handlers

type Handlers struct {
	// contains filtered or unexported fields
}

Handlers manages local state

func New

func New(c *Config) *Handlers

func (*Handlers) Healthz

func (h *Handlers) Healthz() http.HandlerFunc

Healthz returns a dummy healthz page - it's always happy here!

func (*Handlers) Root

func (h *Handlers) Root() http.HandlerFunc

Root redirects to leaderboard.

func (*Handlers) Search

func (h *Handlers) Search() http.HandlerFunc

Search returns search results

func (*Handlers) Threadz

func (h *Handlers) Threadz() http.HandlerFunc

Threadz returns a threadz page

Jump to

Keyboard shortcuts

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