Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var APIKeyAuth = APIKeySecurity("api_key", func() {
Description("Secures endpoint by requiring an API key.")
})
APIKeyAuth defines a security scheme that uses API keys.
View Source
var AppVersion = Type("version", func() {
Description("Application version information")
Attribute("version", String, "Application version", func() {
Example("1.0")
})
Attribute("build_time", String, "Application build time", func() {
Example("")
})
})
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 Forbidden = Type("forbidden", func() {
Description("forbidden indicates access to a resource was denied")
Attribute("name", String, "Name of error", func() { Example("forbidden") })
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("id", String, "ID of device", func() {
Example("resource_12345678")
})
Attribute("name", String, "Name of error", func() { Example("not found") })
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 Origins = []string{
"/127.0.0.1:\\d+/",
"/localhost:\\d+/",
"/192.168.(\\d+).(\\d+):\\d+/",
}
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
Description("unauthorized indicates authentication failed")
Attribute("message", String, "Message of the error", func() {
Example("unauthorized")
})
Required("message")
})
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.