app

package
v0.0.0-...-001d619 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2017 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HelloHref

func HelloHref(whatToSay interface{}) string

HelloHref returns the resource href.

func MountHelloController

func MountHelloController(service *goa.Service, ctrl HelloController)

MountHelloController "mounts" a Hello resource controller on the given service.

Types

type Hello

type Hello struct {
	// What was said
	Hello string `form:"hello" json:"hello" xml:"hello"`
}

Hello World (default view)

Identifier: application/vnd.hello+json; view=default

func (*Hello) Validate

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

Validate validates the Hello media type instance.

type HelloController

type HelloController interface {
	goa.Muxer
	Show(*ShowHelloContext) error
}

HelloController is the controller interface for the Hello actions.

type ShowHelloContext

type ShowHelloContext struct {
	context.Context
	*goa.ResponseData
	*goa.RequestData
	WhatToSay string
}

ShowHelloContext provides the hello show action context.

func NewShowHelloContext

func NewShowHelloContext(ctx context.Context, r *http.Request, service *goa.Service) (*ShowHelloContext, error)

NewShowHelloContext parses the incoming request URL and body, performs validations and creates the context used by the hello controller show action.

func (*ShowHelloContext) NotFound

func (ctx *ShowHelloContext) NotFound() error

NotFound sends a HTTP response with status code 404.

func (*ShowHelloContext) OK

func (ctx *ShowHelloContext) OK(r *Hello) error

OK sends a HTTP response with status code 200.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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