github.com/goadesign/goa/examples/chatter/design
design
import "github.com/goadesign/goa/examples/chatter/design"
Overview
Index
Package files
Variables
var BasicAuth = BasicAuthSecurity("basic", func() {
Description("Secures the login endpoint.")
})
BasicAuth defines a security scheme that uses basic authentication.
var ChatSummary = ResultType("application/vnd.goa.summary", func() {
TypeName("ChatSummary")
Attributes(func() {
Attribute("message", String, "Message sent to the server")
Attribute("length", Int, "Length of the message sent")
Attribute("sent_at", String, "Time at which the message was sent", func() {
Format(FormatDateTime)
})
Required("message")
})
View("tiny", func() {
Attribute("message")
})
})
var JWTAuth = JWTSecurity("jwt", func() {
Description(`Secures endpoint by requiring a valid JWT token. Supports scopes "stream:read" and "stream:write".`)
Scope("stream:read", "Read-only access")
Scope("stream:write", "Read and write access")
})
JWTAuth defines a security scheme that uses JWT tokens.
Generated by godoc2md