models

package
v0.0.0-...-853a174 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2016 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CloseDb

func CloseDb()

func InitDb

func InitDb(dburl, dbname string)

func InitDbData

func InitDbData()

func Rekt

func Rekt()

Types

type Answer

type Answer struct {
	ID       bson.ObjectId `bson:"_id,omitempty"`
	Value    float64       `json:"value"`
	Party    bson.ObjectId `json:"party"`
	Question bson.ObjectId `json:"question"`
}

func RetreiveAllAnswers

func RetreiveAllAnswers(question string) []Answer

func (Answer) Create

func (a Answer) Create() Answer

type Party

type Party struct {
	ID   bson.ObjectId `bson:"_id,omitempty"`
	Name string        `json:"name"`
}

func RetreiveAllParties

func RetreiveAllParties() []Party

func (Party) Create

func (p Party) Create() Party

type Question

type Question struct {
	ID    bson.ObjectId `bson:"_id,omitempty"`
	Title string        `json:"title"`
	Body  string        `json:"body"`
	Area  string        `json:"area"`
}

func RetreiveAllQuestions

func RetreiveAllQuestions(includeArea string) []Question

func (Question) Create

func (q Question) Create() Question

Jump to

Keyboard shortcuts

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