Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var RatingMedia = MediaType("application/cassandra.wannabe.rating+json", func() { Description("A movie rating by a user") TypeName("rating") Reference(RatingPayload) Attributes(func() { Attribute("movieId") Attribute("userId") Attribute("rating") Required("movieId", "userId", "rating") }) View("default", func() { Attribute("movieId") Attribute("userId") Attribute("rating") }) })
RatingMedia is the output type
View Source
var RatingPayload = Type("RatingPayload", func() {
Attribute("movieId", Integer, func() {
Minimum(1)
Example(138493)
})
Attribute("userId", Integer, func() {
Minimum(1)
Example(56757)
})
Attribute("rating", Number, func() {
Minimum(0.5)
Maximum(5)
Example(3.5)
})
Required("movieId", "userId", "rating")
})
RatingPayload is the input type
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.