app

package
v0.0.0-...-bcded96 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2017 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MountHealthController

func MountHealthController(service *goa.Service, ctrl HealthController)

MountHealthController "mounts" a Health resource controller on the given service.

func MountKeysController

func MountKeysController(service *goa.Service, ctrl KeysController)

MountKeysController "mounts" a Keys resource controller on the given service.

Types

type HealthController

type HealthController interface {
	goa.Muxer
	Healthcheck(*HealthcheckHealthContext) error
}

HealthController is the controller interface for the Health actions.

type HealthcheckHealthContext

type HealthcheckHealthContext struct {
	context.Context
	*goa.ResponseData
	*goa.RequestData
}

HealthcheckHealthContext provides the health healthcheck action context.

func NewHealthcheckHealthContext

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

NewHealthcheckHealthContext parses the incoming request URL and body, performs validations and creates the context used by the health controller healthcheck action.

func (*HealthcheckHealthContext) OK

func (ctx *HealthcheckHealthContext) OK(resp []byte) error

OK sends a HTTP response with status code 200.

type KeysController

type KeysController interface {
	goa.Muxer
	List(*ListKeysContext) error
}

KeysController is the controller interface for the Keys actions.

type ListKeysContext

type ListKeysContext struct {
	context.Context
	*goa.ResponseData
	*goa.RequestData
	Payload ListKeysPayload
}

ListKeysContext provides the keys list action context.

func NewListKeysContext

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

NewListKeysContext parses the incoming request URL and body, performs validations and creates the context used by the keys controller list action.

func (*ListKeysContext) BadRequest

func (ctx *ListKeysContext) BadRequest(r error) error

BadRequest sends a HTTP response with status code 400.

func (*ListKeysContext) GatewayTimeout

func (ctx *ListKeysContext) GatewayTimeout(r error) error

GatewayTimeout sends a HTTP response with status code 504.

func (*ListKeysContext) InternalServerError

func (ctx *ListKeysContext) InternalServerError() error

InternalServerError sends a HTTP response with status code 500.

func (*ListKeysContext) OK

OK sends a HTTP response with status code 200.

type ListKeysPayload

type ListKeysPayload []string

ListKeysPayload is the keys list action payload.

type User

type User struct {
	// The list of the Github user's public SSH keys.
	Keys []*UserKey `form:"keys" json:"keys" xml:"keys"`
	// The username of the GitHub user.
	Username string `form:"username" json:"username" xml:"username"`
}

Response Type for a GitHub User's list of public SSH Keys (default view)

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

func (*User) Validate

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

Validate validates the User media type instance.

type UserCollection

type UserCollection []*User

UserCollection is the media type for an array of User (default view)

Identifier: application/vnd.user+json; type=collection; view=default

func (UserCollection) Validate

func (mt UserCollection) Validate() (err error)

Validate validates the UserCollection media type instance.

type UserKey

type UserKey struct {
	// The ID of the public SSH key on GitHub.
	ID int `form:"id" json:"id" xml:"id"`
	// The public SSH key
	Key string `form:"key" json:"key" xml:"key"`
}

Type for a GitHub user's public SSH Key

func (*UserKey) Validate

func (ut *UserKey) Validate() (err error)

Validate validates the UserKey type instance.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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