Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var BottleMedia = MediaType("application/vnd.gophercon.goa.bottle", func() { TypeName("bottle") Reference(BottlePayload) Attributes(func() { Attribute("id") Attribute("name") Attribute("vintage") Attribute("rating") Required("id", "name", "vintage", "rating") }) View("default", func() { Attribute("id") Attribute("name") Attribute("vintage") Attribute("rating") }) })
View Source
var BottlePayload = Type("BottlePayload", func() {
Description("BottlePayload is the type used to create bottles")
Attribute("id", String, "Unique bottle ID", func() {
ReadOnly()
})
Attribute("name", String, "Name of bottle", func() {
MinLength(1)
})
Attribute("vintage", Integer, "Vintage of bottle", func() {
Minimum(1900)
})
Attribute("rating", Integer, "Rating of bottle", func() {
Minimum(1)
Maximum(5)
})
Required("name", "vintage", "rating")
})
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.