handler

package
v0.0.0-...-4b891a6 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2014 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsNotAnAdmin

func IsNotAnAdmin(req *http.Request) bool

Types

type Handler

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

func (*Handler) Leaderboard

func (h *Handler) Leaderboard(w http.ResponseWriter, req *http.Request)

func (*Handler) NewTrip

func (h *Handler) NewTrip(w http.ResponseWriter, req *http.Request)

func (*Handler) People

func (h *Handler) People(w http.ResponseWriter, req *http.Request)

func (*Handler) Person

func (h *Handler) Person(w http.ResponseWriter, req *http.Request)

func (*Handler) Root

func (h *Handler) Root(w http.ResponseWriter, req *http.Request)

func (Handler) Search

func (h Handler) Search(w http.ResponseWriter, req *http.Request)

func (*Handler) Stats

func (h *Handler) Stats(w http.ResponseWriter, req *http.Request)

func (*Handler) SubmitNubz

func (h *Handler) SubmitNubz(w http.ResponseWriter, req *http.Request)

func (*Handler) SubmitTrip

func (h *Handler) SubmitTrip(w http.ResponseWriter, req *http.Request)

func (Handler) Trip

func (h Handler) Trip(w http.ResponseWriter, req *http.Request)

func (*Handler) Trips

func (h *Handler) Trips(w http.ResponseWriter, req *http.Request)

type LeaderPage

type LeaderPage struct {
	Names       []string
	TripCount   []int
	Ranks       []int
	SearchQuery string
}

func (LeaderPage) IsActivePage

func (lp LeaderPage) IsActivePage(num int) bool

type NewTripPage

type NewTripPage struct {
	Names       []string
	Reasons     []string
	SearchQuery string
}

func (NewTripPage) IsActivePage

func (ntp NewTripPage) IsActivePage(num int) bool

type NubJson

type NubJson struct {
	Name      string `json:"name"`
	Book      int    `json:"book"`
	Arrival   string `json:"arrival"`
	Departure string `json:"departure"`
	Entry     string `json:"entry"`
	Nickname  string `json:"nickname"`
	Source    string `json:"source"`
}

type NubzJson

type NubzJson struct {
	TripId string    `json:"trip_id"`
	Nubz   []NubJson `json:"nubz"`
}

type NubzReturnJson

type NubzReturnJson struct {
	Nubz   []TripEntryJson `json:"noobs"`
	TripId string          `json:"trip_id"`
}

type PeoplePage

type PeoplePage struct {
	People      []*db.Person
	SearchQuery string
}

func (PeoplePage) IsActivePage

func (pp PeoplePage) IsActivePage(num int) bool

func (PeoplePage) TimeForRowEnd

func (pp PeoplePage) TimeForRowEnd(location int) bool

func (PeoplePage) TimeForRowStart

func (pp PeoplePage) TimeForRowStart(location int) bool

type PersonEntry

type PersonEntry struct {
	Person *db.Person
	Entry  *db.Entry
}

type PersonPage

type PersonPage struct {
	Person      *db.Person
	Entries     []*db.Entry
	Months      []string
	Trips       []int
	SearchQuery string
}

func (PersonPage) IsActivePage

func (pp PersonPage) IsActivePage(num int) bool

type PersonParams

type PersonParams struct {
	UserId string
}

func (*PersonParams) FieldMap

func (pp *PersonParams) FieldMap() binding.FieldMap

type RootPage

type RootPage struct {
	SearchQuery string
}

func (RootPage) IsActivePage

func (pp RootPage) IsActivePage(num int) bool

type SearchPage

type SearchPage struct {
	PeopleEntries []*PersonEntry
	SearchQuery   string
}

func (SearchPage) IsActivePage

func (sp SearchPage) IsActivePage(num int) bool

type SearchParams

type SearchParams struct {
	Search string
}

func (*SearchParams) FieldMap

func (sp *SearchParams) FieldMap() binding.FieldMap

type StatsPage

type StatsPage struct {
	Years                        []int
	NumPeoples                   []int
	NumNoobs                     []int
	NumUniqueVisitors            []int
	NumDays                      []int
	Sources                      []string
	NumVisitorsForSourcesPerYear [][]int
	Durations                    []float64
	SourcesForPie                []string
	PeopleForPie                 []int
	SearchQuery                  string
}

func (StatsPage) IsActivePage

func (pp StatsPage) IsActivePage(num int) bool

type TripEntryJson

type TripEntryJson struct {
	Name      string `json:"name"`
	Book      int    `json:"book"`
	Arrival   string `json:"arrival"`
	Departure string `json:"departure"`
	Entry     string `json:"entry"`
}

type TripJson

type TripJson struct {
	Reason  string          `json:"reason"`
	Entries []TripEntryJson `json:"entries"`
}

type TripPage

type TripPage struct {
	TripInfo      *db.Entry
	PeopleEntries []*PersonEntry
	SearchQuery   string
}

func (TripPage) IsActivePage

func (tp TripPage) IsActivePage(num int) bool

type TripPageItem

type TripPageItem struct {
	Start       string
	End         string
	Reason      string
	NumPeople   int
	TripId      string
	SearchQuery string
}

type TripParams

type TripParams struct {
	TripId string
}

func (*TripParams) FieldMap

func (tp *TripParams) FieldMap() binding.FieldMap

type TripsPage

type TripsPage struct {
	TripItems    []*TripPageItem
	SearchQuery  string
	TripsPageNum int
	PagesToShow  []int
	NumPages     int
}

func (TripsPage) IsActivePage

func (tp TripsPage) IsActivePage(num int) bool

func (TripsPage) IsLastPage

func (tp TripsPage) IsLastPage() bool

func (TripsPage) IsTripsPageNum

func (tp TripsPage) IsTripsPageNum(num int) bool

func (TripsPage) NextPage

func (tp TripsPage) NextPage() int

func (TripsPage) PrevPage

func (tp TripsPage) PrevPage() int

type TripsParams

type TripsParams struct {
	Page int
}

func (*TripsParams) FieldMap

func (tp *TripsParams) FieldMap() binding.FieldMap

Jump to

Keyboard shortcuts

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