Documentation ¶
Index ¶
- func MountInsecureController(service *goa.Service, ctrl InsecureController)
- func MountSecureController(service *goa.Service, ctrl SecureController)
- func NewJWTSecurity() *goa.JWTSecurity
- func UseJWTMiddleware(service *goa.Service, middleware goa.Middleware)
- type InsecureController
- type PingInsecureContext
- type PingSecureContext
- type Pong
- type SecureController
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MountInsecureController ¶
func MountInsecureController(service *goa.Service, ctrl InsecureController)
MountInsecureController "mounts" a Insecure resource controller on the given service.
func MountSecureController ¶
func MountSecureController(service *goa.Service, ctrl SecureController)
MountSecureController "mounts" a Secure resource controller on the given service.
func NewJWTSecurity ¶
func NewJWTSecurity() *goa.JWTSecurity
NewJWTSecurity creates a jwt security definition.
func UseJWTMiddleware ¶
func UseJWTMiddleware(service *goa.Service, middleware goa.Middleware)
UseJWTMiddleware mounts the jwt auth middleware onto the service.
Types ¶
type InsecureController ¶
type InsecureController interface { goa.Muxer Ping(*PingInsecureContext) error }
InsecureController is the controller interface for the Insecure actions.
type PingInsecureContext ¶
type PingInsecureContext struct { context.Context *goa.ResponseData *goa.RequestData }
PingInsecureContext provides the insecure ping action context.
func NewPingInsecureContext ¶
func NewPingInsecureContext(ctx context.Context, r *http.Request, service *goa.Service) (*PingInsecureContext, error)
NewPingInsecureContext parses the incoming request URL and body, performs validations and creates the context used by the insecure controller ping action.
func (*PingInsecureContext) OK ¶
func (ctx *PingInsecureContext) OK(r *Pong) error
OK sends a HTTP response with status code 200.
type PingSecureContext ¶
type PingSecureContext struct { context.Context *goa.ResponseData *goa.RequestData }
PingSecureContext provides the secure ping action context.
func NewPingSecureContext ¶
func NewPingSecureContext(ctx context.Context, r *http.Request, service *goa.Service) (*PingSecureContext, error)
NewPingSecureContext parses the incoming request URL and body, performs validations and creates the context used by the secure controller ping action.
func (*PingSecureContext) OK ¶
func (ctx *PingSecureContext) OK(r *Pong) error
OK sends a HTTP response with status code 200.
func (*PingSecureContext) Unauthorized ¶
func (ctx *PingSecureContext) Unauthorized() error
Unauthorized sends a HTTP response with status code 401.
type Pong ¶
type Pong struct { // like it's 1999 Msg string `form:"msg" json:"msg" xml:"msg"` }
Pong media type (default view)
Identifier: application/vnd.goa-sso-client.pong; view=default
type SecureController ¶
type SecureController interface { goa.Muxer Ping(*PingSecureContext) error }
SecureController is the controller interface for the Secure actions.