design

package
v0.0.0-...-d42fbf4 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2017 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ClassMedia = MediaType("application/studiously.class+json", func() {
	Attributes(func() {
		Attribute("id", Integer)
		Attribute("name", String)
		Attribute("current_unit", Integer, "Current unit of study")

		Required("id", "name")
	})
	View("default", func() {
		Attribute("id")
		Attribute("name")
		Attribute("current_unit")
	})
})
View Source
var MemberMedia = MediaType("application/studiously.member+json", func() {
	Attributes(func() {
		Attribute("id", Integer)
		Attribute("name", String)
		Attribute("role", String, func() {
			Enum("student", "moderator", "teacher", "administrator")
		})
		Required("id", "name", "role")
	})
	View("default", func() {
		Attribute("id")
		Attribute("name")
		Attribute("role")
	})
})
View Source
var QuestionMedia = MediaType("application/studiously.question+json", func() {

	Attributes(func() {
		Attribute("id", Integer)
		Attribute("question_type", String)
		Attribute("author_id", Integer)
		Attribute("unit_id", Integer)
		Attribute("votes", Integer)
		Attribute("answered", Boolean)
		Attribute("data", Any)
		Required("id", "question_type", "unit_id")
	})
	View("default", func() {
		Attribute("id")
		Attribute("question_type")
		Attribute("author_id")
		Attribute("unit_id")
		Attribute("votes")
		Attribute("answered")
		Attribute("data")
	})
	View("by_unit", func() {
		Attribute("id")
		Attribute("question_type")
		Attribute("author_id")
		Attribute("votes")
		Attribute("answered")
		Attribute("data")
	})
	View("by_author", func() {
		Attribute("id")
		Attribute("question_type")
		Attribute("unit_id")
		Attribute("votes")
		Attribute("answered")
		Attribute("data")
	})
	View("by_type", func() {
		Attribute("id")
		Attribute("author_id")
		Attribute("unit_id")
		Attribute("votes")
		Attribute("answered")
		Attribute("data")
	})
	View("feed", func() {
		Attribute("id")
		Attribute("author_id")
		Attribute("unit_id")
		Attribute("votes")
		Attribute("answered")
	})
})

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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