Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Address = Type("Address", func() {
Description("Address is a street address")
Attribute("number", Integer, "Street number", func() {
Minimum(1)
})
Attribute("street", String, "Street name", func() {
MinLength(1)
})
Attribute("city", String, "City", func() {
MinLength(1)
})
Attribute("state", String, "US State Code", func() {
MinLength(2)
MaxLength(2)
})
Attribute("zip", Integer, "US Zip code", func() {
Minimum(10000)
Maximum(99999)
})
Required("number", "street", "city", "state", "zip")
})
Address is the type used to represent street addresses.
View Source
var CourseMedia = MediaType("application/vnd.goworkshop.course+json", func() { Description("CourseMedia is the media type used to render courses") TypeName("CourseMedia") Reference(CoursePayload) Attributes(func() { Attribute("id", Integer, "Course identifier") Attribute("href", String, "Course href") Attribute("name") Attribute("description") Attribute("start_time") Attribute("end_time") Attribute("location") Required("id", "href", "name", "start_time", "end_time", "location") }) View("default", func() { Attribute("id") Attribute("href") Attribute("name") Attribute("description") Attribute("start_time") Attribute("end_time") Attribute("location") }) View("link", func() { Attribute("id") Attribute("href") }) })
CourseMedia is the media type used to render courses.
View Source
var CoursePatchPayload = Type("CoursePatchPayload", func() {
Description("CoursePatchPayload is the type used to patch courses")
Attribute("description", String, "Course description")
Attribute("start_time", DateTime, "Course start date/time")
Attribute("end_time", DateTime, "Course end date/time")
Attribute("location", String, "Course location", func() {
MinLength(2)
})
})
CoursePatchPayload is the type used to patch courses.
View Source
var CoursePayload = Type("CoursePayload", func() { Description("CoursePayload is the type used to create courses") Reference(CoursePatchPayload) Attribute("name", String, "Course name", func() { MinLength(3) }) Attribute("description") Attribute("start_time") Attribute("end_time") Attribute("location") Required("name", "start_time", "end_time", "location") })
CoursePayload is the type used to create courses.
View Source
var RegistrationMedia = MediaType("application/vnd.goworkshop.registration+json", func() { Description("RegistrationMedia is the media type used to render registrations") TypeName("RegistrationMedia") Reference(RegistrationPayload) Attributes(func() { Attribute("id", Integer, "Registration identifier") Attribute("href", String, "Registration href") Attribute("course", CourseMedia, "Course being taught") Attribute("first_name") Attribute("last_name") Attribute("address") Link("course") Required("id", "href", "course", "first_name", "last_name", "address") }) View("default", func() { Attribute("id") Attribute("href") Attribute("first_name") Attribute("last_name") Attribute("address") Attribute("links") }) View("extended", func() { Attribute("id") Attribute("href") Attribute("course") Attribute("first_name") Attribute("last_name") Attribute("address") Attribute("links") }) })
RegistrationMedia is the media type used to render registrations.
View Source
var RegistrationPatchPayload = Type("RegistrationPatchPayload", func() { Description("RegistrationPatchPayload is the type used to patch registrations") Attribute("first_name", String, "Attendee first name", func() { MinLength(2) }) Attribute("last_name", String, "Attendee last name", func() { MinLength(2) }) Attribute("address", Address, "Attendee address") })
RegistrationPatchPayload is the type used to patch registrations.
View Source
var RegistrationPayload = Type("RegistrationPayload", func() { Description("RegistrationPayload is the type used to create registrations") Reference(RegistrationPatchPayload) Attribute("course_href", String, "The href to the course resource that describes the course being taught", func() { Pattern("/courses/[0-9]+") }) Attribute("first_name") Attribute("last_name") Attribute("address") Required("course_href", "first_name", "last_name", "address") })
RegistrationPayload is the type used to create registrations.
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.