app

package
v0.0.0-...-2831af8 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2017 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MountUserController

func MountUserController(service *goa.Service, ctrl UserController)

MountUserController "mounts" a User resource controller on the given service.

Types

type JSON

type JSON struct {
	// Username
	ID string `form:"id" json:"id" xml:"id"`
}

Credentials (default view)

Identifier: application/json; view=default

func (*JSON) Validate

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

Validate validates the JSON media type instance.

type LoginUserContext

type LoginUserContext struct {
	context.Context
	*goa.ResponseData
	*goa.RequestData
	Username string
}

LoginUserContext provides the user login action context.

func NewLoginUserContext

func NewLoginUserContext(ctx context.Context, service *goa.Service) (*LoginUserContext, error)

NewLoginUserContext parses the incoming request URL and body, performs validations and creates the context used by the user controller login action.

func (*LoginUserContext) NotFound

func (ctx *LoginUserContext) NotFound() error

NotFound sends a HTTP response with status code 404.

func (*LoginUserContext) OK

func (ctx *LoginUserContext) OK(r *JSON) error

OK sends a HTTP response with status code 200.

type UserController

type UserController interface {
	goa.Muxer
	Login(*LoginUserContext) error
}

UserController is the controller interface for the User actions.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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