models

package
v0.0.0-...-e12035f Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2017 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Data

type Data struct {
	Id        bson.ObjectId `json:"id" bson:"_id,omitempty"`
	SubjectId bson.ObjectId `json:"subjectId" bson:"subjectId"`
	Time      int64         `json:"time" bson:"time"`
	Reporter  string        `json:"reporter" bson:"reporter,omitempty"`
	Extra     bson.M        `bson:",inline"`
}

type Field

type Field struct {
	Name     string `form:"name" json:"name"`
	Type     string `form:"type" json:"type"`
	Required bool   `form:"required" json:"required"`
	Default  string `form:"default" json:"default"`
}

type Histogram

type Histogram struct {
	Id        bson.ObjectId               `json:"id" bson:"_id"`
	SubjectId bson.ObjectId               `json:"subjectId" bson:"subjectId"`
	Time      int64                       `json:"time" bson:"time"`
	Values    map[string]map[string]int64 `json:"values" bson:"values"`
}

type Permission

type Permission struct {
	Id            bson.ObjectId `bson:"_id,omitempty" json:"id"`
	Email         string        `json:"email"`
	SubjectId     bson.ObjectId `json:"subjectId"`
	CanContribute bool          `json:"canContribute"`
	CanManage     bool          `json:"canManage"`
}

type Presentation

type Presentation struct {
	Id        bson.ObjectId `json:"id" bson:"_id"`
	SubjectId bson.ObjectId `json:"subjectId" bson:"subjectId"`
	Owner     string        `json:"owner" bson:"owner"`
	//Os:Field:display
	Preferences map[string]map[string]string `json:"preferences" bson:"preferences"`
	FieldOrder  []string                     `json:"fieldOrder" bson:"fieldOrder"`
	RawData     []Data                       `json:"rawData" bson:"rawData"`
	Histogram   Histogram                    `json:"histogram" bson:"histogra"`
}

type Subject

type Subject struct {
	Id          bson.ObjectId `json:"id" bson:"_id"`
	Title       string        `form:"title" json:"title"`
	Description string        `form:"description" json:"description"`
	SubSubjects []Subject     `bson:",omitempty" json:"subsubjects"`
	Fields      []Field       `form:"fields" json:"fields"`
	Public      bool          `bson:",omitempty" json:"public"`
	Owner       string        `form:"owner" json:"owner"`
}

Jump to

Keyboard shortcuts

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