db

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: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetUniqueId

func GetUniqueId() string

Types

type Controller

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

func (*Controller) AddEntry

func (c *Controller) AddEntry(entry *Entry)

func (*Controller) AddPerson

func (c *Controller) AddPerson(person *Person) string

func (*Controller) CreateTables

func (c *Controller) CreateTables()

func (*Controller) GetAvgDurationPerYear

func (c *Controller) GetAvgDurationPerYear() ([]int, []float64)

func (*Controller) GetEntry

func (c *Controller) GetEntry(userId string, tripId string) *Entry

func (*Controller) GetLastTrip

func (c *Controller) GetLastTrip() []*Entry

func (*Controller) GetLeaderboard

func (c *Controller) GetLeaderboard() ([]string, []int)

func (*Controller) GetMonthCountForPerson

func (c *Controller) GetMonthCountForPerson(userId string) ([]string, []int)

func (*Controller) GetNumPages

func (c *Controller) GetNumPages(size int) int

func (*Controller) GetPeople

func (c *Controller) GetPeople() []*Person

func (*Controller) GetPerson

func (c *Controller) GetPerson(userId string) *Person

func (*Controller) GetPersonsEntries

func (c *Controller) GetPersonsEntries(userId string) []*Entry

func (*Controller) GetRecentTrips

func (c *Controller) GetRecentTrips(num int, page int) [][]*Entry

func (*Controller) GetSources

func (c *Controller) GetSources() ([]string, []int)

func (*Controller) GetTripReason

func (c *Controller) GetTripReason(tripId string) string

func (*Controller) GetTripReasons

func (c *Controller) GetTripReasons() []string

func (*Controller) GetTripsEntries

func (c *Controller) GetTripsEntries(tripId string) []*Entry

func (*Controller) GetUserIdByName

func (c *Controller) GetUserIdByName(name string) string

func (*Controller) GetYearsToDays

func (c *Controller) GetYearsToDays() ([]int, []int)

func (*Controller) GetYearsToNumNewVisitors

func (c *Controller) GetYearsToNumNewVisitors() ([]int, []int)

func (*Controller) GetYearsToNumVisitors

func (c *Controller) GetYearsToNumVisitors() ([]int, []int)

func (*Controller) GetYearsToUniqueVisitors

func (c *Controller) GetYearsToUniqueVisitors() ([]int, []int)

func (*Controller) GetYearsToVisitorsSources

func (c *Controller) GetYearsToVisitorsSources() ([]int, []string, [][]int)

func (*Controller) SearchForTrips

func (c *Controller) SearchForTrips(search string) []*Entry

type Entry

type Entry struct {
	TripId     string    `sql:"trip_id"`
	UserId     string    `sql:"user_id"`
	TripReason string    `sql:"trip_reason"`
	DateStart  time.Time `sql:"date_start"`
	DateEnd    time.Time `sql:"date_end"`
	Entry      string    `sql:"entry"`
	Book       int       `sql:"book"`
}

func (Entry) EndString

func (e Entry) EndString() string

func (Entry) EntryHtml

func (e Entry) EntryHtml() template.HTML

func (Entry) StartString

func (e Entry) StartString() string

func (Entry) String

func (e Entry) String() string

type Person

type Person struct {
	UserId   string `sql:"user_id"`
	Name     string `sql:"name"`
	Nickname string `sql:"nickname"`
	Source   string `sql:"source"`
}

func (Person) String

func (p Person) String() string

Jump to

Keyboard shortcuts

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