app

package
v0.0.0-...-50c1148 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 12, 2017 License: MIT Imports: 3 Imported by: 0

Documentation

Index

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

func (*Pong) Validate

func (mt *Pong) Validate() (err error)

Validate validates the Pong media type instance.

type SecureController

type SecureController interface {
	goa.Muxer
	Ping(*PingSecureContext) error
}

SecureController is the controller interface for the Secure actions.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL