Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Authorize = MediaType("application/vnd.authorize+json", func() {
Description("Token authorization response")
Attributes(func() {
Attribute("access_token", String, "access token", func() {
})
Attribute("expires_in", Integer, "Time to expiration in seconds", func() {
})
Attribute("token_type", String, "type of token", func() {
})
})
View("default", func() {
Attribute("access_token")
Attribute("expires_in")
Attribute("token_type")
})
})
Authorize is the authorize resource media type.
var Login = MediaType("application/vnd.login+json", func() {
Description("")
Attributes(func() {
Attribute("email", String, "email", func() {
})
Attribute("password", String, "password", func() {
})
Attribute("application", String, "UUID of requesting application", func() {
})
})
View("default", func() {
Attribute("email")
Attribute("password")
Attribute("application")
})
})
Login is the Login resource media type.
var Proposal = MediaType("application/vnd.proposal+json", func() { Description("A response to a CFP") Reference(ProposalPayload) Attributes(func() { Attribute("id", Integer, "ID of user") Attribute("href", String, "API href of user") Attribute("title", String, "Response title") Attribute("abstract", String, "Response abstract") Attribute("detail", String, "Response detail") Attribute("reviews", CollectionOf(Review), "Reviews") }) Links(func() { Link("reviews") }) View("default", func() { Attribute("id") Attribute("href") Attribute("title") Attribute("abstract") Attribute("detail") Attribute("reviews") Attribute("links") }) View("link", func() { Attribute("id") Attribute("href") Attribute("title") }) })
Proposal is the proposal resource mediatype
var ProposalPayload = Type("ProposalPayload", func() {
Attribute("title", func() {
MinLength(10)
MaxLength(200)
})
Attribute("abstract", func() {
MinLength(50)
MaxLength(500)
})
Attribute("detail", func() {
MinLength(100)
MaxLength(2000)
})
Attribute("withdrawn", Boolean)
})
ProposalModel defines the data structure used in the create proposal request body. It is also the base type for the proposal media type used to render users.
var Review = MediaType("application/vnd.review+json", func() { Description("A review is submitted by a reviewer") Reference(ReviewPayload) Attributes(func() { Attribute("id", Integer, "ID of user") Attribute("href", String, "API href of user") Attribute("comment", String, "Review comments") Attribute("rating", Integer, "Rating of proposal, from 1-5") }) View("default", func() { Attribute("id") Attribute("href") Attribute("comment") Attribute("rating") }) View("link", func() { Attribute("id") Attribute("href") }) })
Review is the review resource mediatype
var ReviewPayload = Type("ReviewPayload", func() {
Attribute("comment", func() {
MinLength(10)
MaxLength(200)
})
Attribute("rating", Integer, func() {
Minimum(1)
Maximum(5)
})
})
ReviewModel defines the data structure used to create a review request body It is also the base type for the review media type used to render reviews
var User = MediaType("application/vnd.user+json", func() { Description("A user belonging to a tenant account") Reference(UserPayload) Attributes(func() { Attribute("id", Integer, "ID of user") Attribute("href", String, "API href of user") Attribute("firstname", String, "First name of user") Attribute("lastname", String, "Last name of user") Attribute("city", String, "City of residence") Attribute("state", String, "State of residence") Attribute("country", String, "Country of residence") Attribute("bio", String, "Biography of user") Attribute("role", String, "Role of user") Attribute("email", String, "Email address of user", func() { Format("email") }) }) View("default", func() { Attribute("id") Attribute("href") Attribute("firstname") Attribute("lastname") Attribute("email") Attribute("city") Attribute("state") Attribute("country") Attribute("bio") Attribute("role") }) View("link", func() { Attribute("id") Attribute("href") Attribute("email") }) })
User is the user resource media type.
var UserPayload = Type("UserPayload", func() {
Attribute("firstname", func() {
})
Attribute("lastname", func() {
})
Attribute("city", func() {
})
Attribute("state", func() {
})
Attribute("country", func() {
})
Attribute("email", func() {
Format("email")
})
Attribute("bio", func() {
MaxLength(500)
})
})
UserModel defines the data structure used in the create user request body. It is also the base type for the user media type used to render users.
Functions ¶
This section is empty.
Types ¶
This section is empty.