Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var BadRequest = Type("bad-request", func() {
Description("bad-request indicates the values provided are invalid")
Attribute("name", String, "Name of error", func() { Example("bad request") })
Attribute("message", String, "Error message", func() {
Example("bad request")
})
Attribute("detail", String, "Error details", func() {
Example("Failed to determine machine information. Cannot continue.")
})
Required("message", "detail", "name")
})
View Source
var NotFound = Type("not-found", func() {
Description("not-found indicates the resource matching the id does not exist.")
Attribute("user", String, "Github username", func() {
Example("rs")
})
Attribute("name", String, "Name of error", func() { Example("not found") })
Attribute("message", String, "Error message", func() {
Example("not found")
})
Attribute("detail", String, "Error details", func() {
Example("Failed to determine machine information. Cannot continue.")
})
Required("message", "detail", "name")
})
View Source
var ServerError = Type("server-error", func() {
Description("server-error indicates the server encountered an error.")
Attribute("name", String, "Name of error", func() { Example("internal server error") })
Attribute("message", String, "Error message", func() {
Example("bad request")
})
Attribute("detail", String, "Error details", func() {
Example("Failed to determine machine information. Cannot continue.")
})
Required("message", "detail", "name")
})
View Source
var User = Type("User", func() {
Description("Github user object")
Attribute("username", String, "Username of Github user", func() {
Example("rs")
})
Attribute("name", String, "Name of Github user", func() {
Example("Olivier Poitrey")
})
Attribute("followers", Int, "Number of Github users following", func() {
Example(4467)
})
Attribute("repos", Int, "Number of public Github repositories this user owns", func() {
Example(116)
})
Attribute("company", String, "User supplied employer name", func() {
Example("Netflix")
})
Attribute("location", String, "User supplied location", func() {
Example("Silicon Valley, California, USA")
})
Attribute("blog", String, "User supplied website/blog", func() {
Example("https://nextdns.io")
})
})
View Source
var Users = ResultType("application/vnd.goa-github.users", func() { TypeName("Users") Description("A list of Users") Reference(User) Attributes(func() { Attribute("username") Attribute("name") Attribute("followers") Attribute("repos") Attribute("company") Attribute("location") Attribute("blog") }) View("default", func() { Attribute("username") Attribute("name") Attribute("followers") Attribute("repos") }) View("detailed", func() { Attribute("username") Attribute("name") Attribute("followers") Attribute("repos") Attribute("company") Attribute("location") Attribute("blog") }) Required( "username", "name", "followers", "repos", ) })
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.