app

package
v0.0.0-...-a8bf646 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2019 License: MIT Imports: 8 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MountAccountController

func MountAccountController(service *goa.Service, ctrl AccountController)

MountAccountController "mounts" a Account resource controller on the given service.

func MountAuthController

func MountAuthController(service *goa.Service, ctrl AuthController)

MountAuthController "mounts" a Auth resource controller on the given service.

func MountPeersController

func MountPeersController(service *goa.Service, ctrl PeersController)

MountPeersController "mounts" a Peers resource controller on the given service.

func MountPodsController

func MountPodsController(service *goa.Service, ctrl PodsController)

MountPodsController "mounts" a Pods resource controller on the given service.

func MountSwaggerController

func MountSwaggerController(service *goa.Service, ctrl SwaggerController)

MountSwaggerController "mounts" a Swagger resource controller on the given service.

func MountUsersController

func MountUsersController(service *goa.Service, ctrl UsersController)

MountUsersController "mounts" a Users resource controller on the given service.

func MountWebsocketController

func MountWebsocketController(service *goa.Service, ctrl WebsocketController)

MountWebsocketController "mounts" a Websocket resource controller on the given service.

func NewJWTSecurity

func NewJWTSecurity() *goa.JWTSecurity

NewJWTSecurity creates a jwt security definition.

func NewOptionalJWTSecurity

func NewOptionalJWTSecurity() *goa.JWTSecurity

NewOptionalJWTSecurity creates a optional_jwt security definition.

func PeersHref

func PeersHref(id interface{}) string

PeersHref returns the resource href.

func PodsHref

func PodsHref(id interface{}) string

PodsHref returns the resource href.

func UseJWTMiddleware

func UseJWTMiddleware(service *goa.Service, middleware goa.Middleware)

UseJWTMiddleware mounts the jwt auth middleware onto the service.

func UseOptionalJWTMiddleware

func UseOptionalJWTMiddleware(service *goa.Service, middleware goa.Middleware)

UseOptionalJWTMiddleware mounts the optional_jwt auth middleware onto the service.

func UsersHref

func UsersHref(id interface{}) string

UsersHref returns the resource href.

Types

type AccountController

type AccountController interface {
	goa.Muxer
	Profile(*ProfileAccountContext) error
	UpdatePassword(*UpdatePasswordAccountContext) error
}

AccountController is the controller interface for the Account actions.

type AddPeersContext

type AddPeersContext struct {
	context.Context
	*goa.ResponseData
	*goa.RequestData
	Payload *AddPeersPayload
}

AddPeersContext provides the peers add action context.

func NewAddPeersContext

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

NewAddPeersContext parses the incoming request URL and body, performs validations and creates the context used by the peers controller add action.

func (*AddPeersContext) BadRequest

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

BadRequest sends a HTTP response with status code 400.

func (*AddPeersContext) Created

func (ctx *AddPeersContext) Created(r *PeerCreated) error

Created sends a HTTP response with status code 201.

func (*AddPeersContext) InternalServerError

func (ctx *AddPeersContext) InternalServerError(r error) error

InternalServerError sends a HTTP response with status code 500.

func (*AddPeersContext) NotFound

func (ctx *AddPeersContext) NotFound(r error) error

NotFound sends a HTTP response with status code 404.

type AddPeersPayload

type AddPeersPayload struct {
	// ピアコード
	Code string `form:"code" json:"code" yaml:"code" xml:"code"`
	// ポッドID
	PodID int `form:"pod_id" json:"pod_id" yaml:"pod_id" xml:"pod_id"`
}

AddPeersPayload is the peers add action payload.

func (*AddPeersPayload) Validate

func (payload *AddPeersPayload) Validate() (err error)

Validate runs the validation rules defined in the design.

type AddPodsContext

type AddPodsContext struct {
	context.Context
	*goa.ResponseData
	*goa.RequestData
	Payload *AddPodsPayload
}

AddPodsContext provides the pods add action context.

func NewAddPodsContext

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

NewAddPodsContext parses the incoming request URL and body, performs validations and creates the context used by the pods controller add action.

func (*AddPodsContext) BadRequest

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

BadRequest sends a HTTP response with status code 400.

func (*AddPodsContext) Created

func (ctx *AddPodsContext) Created(r *PodCreated) error

Created sends a HTTP response with status code 201.

func (*AddPodsContext) InternalServerError

func (ctx *AddPodsContext) InternalServerError(r error) error

InternalServerError sends a HTTP response with status code 500.

type AddPodsPayload

type AddPodsPayload struct {
	// ポッド名
	Code string `form:"code" json:"code" yaml:"code" xml:"code"`
	// 緯度
	Latitude float64 `form:"latitude" json:"latitude" yaml:"latitude" xml:"latitude"`
	// スクリーンネーム
	Longitude float64 `form:"longitude" json:"longitude" yaml:"longitude" xml:"longitude"`
}

AddPodsPayload is the pods add action payload.

func (*AddPodsPayload) Validate

func (payload *AddPodsPayload) Validate() (err error)

Validate runs the validation rules defined in the design.

type AddUsersContext

type AddUsersContext struct {
	context.Context
	*goa.ResponseData
	*goa.RequestData
	Payload *AddUsersPayload
}

AddUsersContext provides the users add action context.

func NewAddUsersContext

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

NewAddUsersContext parses the incoming request URL and body, performs validations and creates the context used by the users controller add action.

func (*AddUsersContext) BadRequest

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

BadRequest sends a HTTP response with status code 400.

func (*AddUsersContext) Created

func (ctx *AddUsersContext) Created(r *User) error

Created sends a HTTP response with status code 201.

func (*AddUsersContext) InternalServerError

func (ctx *AddUsersContext) InternalServerError(r error) error

InternalServerError sends a HTTP response with status code 500.

type AddUsersPayload

type AddUsersPayload struct {
	// パスワード
	Password string `form:"password" json:"password" yaml:"password" xml:"password"`
	// 権限ID
	PrivilegeID int `form:"privilege_id" json:"privilege_id" yaml:"privilege_id" xml:"privilege_id"`
	// スクリーンネーム
	ScreenName string `form:"screen_name" json:"screen_name" yaml:"screen_name" xml:"screen_name"`
}

AddUsersPayload is the users add action payload.

func (*AddUsersPayload) Validate

func (payload *AddUsersPayload) Validate() (err error)

Validate runs the validation rules defined in the design.

type AuthAuthContext

type AuthAuthContext struct {
	context.Context
	*goa.ResponseData
	*goa.RequestData
	Payload *AuthAuthPayload
}

AuthAuthContext provides the auth auth action context.

func NewAuthAuthContext

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

NewAuthAuthContext parses the incoming request URL and body, performs validations and creates the context used by the auth controller auth action.

func (*AuthAuthContext) InternalServerError

func (ctx *AuthAuthContext) InternalServerError(r error) error

InternalServerError sends a HTTP response with status code 500.

func (*AuthAuthContext) OK

func (ctx *AuthAuthContext) OK(r *AuthSucces) error

OK sends a HTTP response with status code 200.

func (*AuthAuthContext) Unauthorized

func (ctx *AuthAuthContext) Unauthorized(r error) error

Unauthorized sends a HTTP response with status code 401.

type AuthAuthPayload

type AuthAuthPayload struct {
	// パスワード
	Password string `form:"password" json:"password" yaml:"password" xml:"password"`
	// スクリーンネーム
	ScreenName string `form:"screen_name" json:"screen_name" yaml:"screen_name" xml:"screen_name"`
}

AuthAuthPayload is the auth auth action payload.

func (*AuthAuthPayload) Validate

func (payload *AuthAuthPayload) Validate() (err error)

Validate runs the validation rules defined in the design.

type AuthController

type AuthController interface {
	goa.Muxer
	Auth(*AuthAuthContext) error
}

AuthController is the controller interface for the Auth actions.

type AuthSucces

type AuthSucces struct {
	// コード
	ScreenName string `form:"screen_name" json:"screen_name" yaml:"screen_name" xml:"screen_name"`
	// トークン
	Token string `form:"token" json:"token" yaml:"token" xml:"token"`
}

認証成功 (default view)

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

func (*AuthSucces) Validate

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

Validate validates the AuthSucces media type instance.

type CurrentLocationPeersContext

type CurrentLocationPeersContext struct {
	context.Context
	*goa.ResponseData
	*goa.RequestData
	ID int
}

CurrentLocationPeersContext provides the peers current location action context.

func NewCurrentLocationPeersContext

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

NewCurrentLocationPeersContext parses the incoming request URL and body, performs validations and creates the context used by the peers controller current location action.

func (*CurrentLocationPeersContext) InternalServerError

func (ctx *CurrentLocationPeersContext) InternalServerError(r error) error

InternalServerError sends a HTTP response with status code 500.

func (*CurrentLocationPeersContext) NotFound

func (ctx *CurrentLocationPeersContext) NotFound(r error) error

NotFound sends a HTTP response with status code 404.

func (*CurrentLocationPeersContext) OK

OK sends a HTTP response with status code 200.

type ListPeersContext

type ListPeersContext struct {
	context.Context
	*goa.ResponseData
	*goa.RequestData
	Limit  int
	Offset int
}

ListPeersContext provides the peers list action context.

func NewListPeersContext

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

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

func (*ListPeersContext) InternalServerError

func (ctx *ListPeersContext) InternalServerError(r error) error

InternalServerError sends a HTTP response with status code 500.

func (*ListPeersContext) NotFound

func (ctx *ListPeersContext) NotFound(r error) error

NotFound sends a HTTP response with status code 404.

func (*ListPeersContext) OK

OK sends a HTTP response with status code 200.

type ListPodsContext

type ListPodsContext struct {
	context.Context
	*goa.ResponseData
	*goa.RequestData
	Limit  int
	Offset int
}

ListPodsContext provides the pods list action context.

func NewListPodsContext

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

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

func (*ListPodsContext) InternalServerError

func (ctx *ListPodsContext) InternalServerError(r error) error

InternalServerError sends a HTTP response with status code 500.

func (*ListPodsContext) NotFound

func (ctx *ListPodsContext) NotFound(r error) error

NotFound sends a HTTP response with status code 404.

func (*ListPodsContext) OK

func (ctx *ListPodsContext) OK(r PodCollection) error

OK sends a HTTP response with status code 200.

type ListUsersContext

type ListUsersContext struct {
	context.Context
	*goa.ResponseData
	*goa.RequestData
	Limit  int
	Offset int
}

ListUsersContext provides the users list action context.

func NewListUsersContext

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

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

func (*ListUsersContext) InternalServerError

func (ctx *ListUsersContext) InternalServerError(r error) error

InternalServerError sends a HTTP response with status code 500.

func (*ListUsersContext) NotFound

func (ctx *ListUsersContext) NotFound(r error) error

NotFound sends a HTTP response with status code 404.

func (*ListUsersContext) OK

OK sends a HTTP response with status code 200.

type LocationsPeersContext

type LocationsPeersContext struct {
	context.Context
	*goa.ResponseData
	*goa.RequestData
	ID int
}

LocationsPeersContext provides the peers locations action context.

func NewLocationsPeersContext

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

NewLocationsPeersContext parses the incoming request URL and body, performs validations and creates the context used by the peers controller locations action.

func (*LocationsPeersContext) InternalServerError

func (ctx *LocationsPeersContext) InternalServerError(r error) error

InternalServerError sends a HTTP response with status code 500.

func (*LocationsPeersContext) NotFound

func (ctx *LocationsPeersContext) NotFound(r error) error

NotFound sends a HTTP response with status code 404.

func (*LocationsPeersContext) OK

OK sends a HTTP response with status code 200.

type Peer

type Peer struct {
	// ポッド装置に接近している
	Approaching bool `form:"approaching" json:"approaching" yaml:"approaching" xml:"approaching"`
	// コード
	Code string `form:"code" json:"code" yaml:"code" xml:"code"`
	// 作成日
	CreatedAt int64 `form:"created_at" json:"created_at" yaml:"created_at" xml:"created_at"`
	// ID
	ID int64 `form:"id" json:"id" yaml:"id" xml:"id"`
	// 更新日
	UpdatedAt int64 `form:"updated_at" json:"updated_at" yaml:"updated_at" xml:"updated_at"`
}

ピア (default view)

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

func (*Peer) Validate

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

Validate validates the Peer media type instance.

type PeerApproaching

type PeerApproaching struct {
	// ポッド装置に接近している
	Approaching bool `form:"approaching" json:"approaching" yaml:"approaching" xml:"approaching"`
	// ピアコード
	Code string `form:"code" json:"code" yaml:"code" xml:"code"`
	// 作成日
	CreatedAt int64 `form:"created_at" json:"created_at" yaml:"created_at" xml:"created_at"`
	// 緯度
	Latitude float64 `form:"latitude" json:"latitude" yaml:"latitude" xml:"latitude"`
	// 経度
	Longitude float64 `form:"longitude" json:"longitude" yaml:"longitude" xml:"longitude"`
	// タイプ
	Type string `form:"type" json:"type" yaml:"type" xml:"type"`
}

ピア接近 (default view)

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

func (*PeerApproaching) Validate

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

Validate validates the PeerApproaching media type instance.

type PeerCollection

type PeerCollection []*Peer

PeerCollection is the media type for an array of Peer (default view)

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

func (PeerCollection) Validate

func (mt PeerCollection) Validate() (err error)

Validate validates the PeerCollection media type instance.

type PeerCreated

type PeerCreated struct {
	// コード
	Code string `form:"code" json:"code" yaml:"code" xml:"code"`
	// 作成日
	CreatedAt int64 `form:"created_at" json:"created_at" yaml:"created_at" xml:"created_at"`
	// ID
	ID int64 `form:"id" json:"id" yaml:"id" xml:"id"`
	// トークン
	Token string `form:"token" json:"token" yaml:"token" xml:"token"`
	// 更新日
	UpdatedAt int64 `form:"updated_at" json:"updated_at" yaml:"updated_at" xml:"updated_at"`
}

ピア作成成功 (default view)

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

func (*PeerCreated) Validate

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

Validate validates the PeerCreated media type instance.

type PeerLocation

type PeerLocation struct {
	// 作成日
	CreatedAt int64 `form:"created_at" json:"created_at" yaml:"created_at" xml:"created_at"`
	// 緯度
	Latitude float64 `form:"latitude" json:"latitude" yaml:"latitude" xml:"latitude"`
	// 経度
	Longitude float64 `form:"longitude" json:"longitude" yaml:"longitude" xml:"longitude"`
	// 更新日
	UpdatedAt int64 `form:"updated_at" json:"updated_at" yaml:"updated_at" xml:"updated_at"`
}

ピア位置情報 (default view)

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

func (*PeerLocation) Validate

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

Validate validates the PeerLocation media type instance.

type PeerLocationCollection

type PeerLocationCollection []*PeerLocation

PeerLocationCollection is the media type for an array of PeerLocation (default view)

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

func (PeerLocationCollection) Validate

func (mt PeerLocationCollection) Validate() (err error)

Validate validates the PeerLocationCollection media type instance.

type PeersController

type PeersController interface {
	goa.Muxer
	Add(*AddPeersContext) error
	CurrentLocation(*CurrentLocationPeersContext) error
	List(*ListPeersContext) error
	Locations(*LocationsPeersContext) error
	RegenerateToken(*RegenerateTokenPeersContext) error
	SendLocation(*SendLocationPeersContext) error
	Show(*ShowPeersContext) error
	ShowByToken(*ShowByTokenPeersContext) error
	Update(*UpdatePeersContext) error
}

PeersController is the controller interface for the Peers actions.

type PeersListPodsContext

type PeersListPodsContext struct {
	context.Context
	*goa.ResponseData
	*goa.RequestData
	ID     int
	Limit  int
	Offset int
}

PeersListPodsContext provides the pods peers list action context.

func NewPeersListPodsContext

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

NewPeersListPodsContext parses the incoming request URL and body, performs validations and creates the context used by the pods controller peers list action.

func (*PeersListPodsContext) InternalServerError

func (ctx *PeersListPodsContext) InternalServerError(r error) error

InternalServerError sends a HTTP response with status code 500.

func (*PeersListPodsContext) NotFound

func (ctx *PeersListPodsContext) NotFound(r error) error

NotFound sends a HTTP response with status code 404.

func (*PeersListPodsContext) OK

OK sends a HTTP response with status code 200.

type Pod

type Pod struct {
	// コード
	Code string `form:"code" json:"code" yaml:"code" xml:"code"`
	// 作成日
	CreatedAt int64 `form:"created_at" json:"created_at" yaml:"created_at" xml:"created_at"`
	// ID
	ID int64 `form:"id" json:"id" yaml:"id" xml:"id"`
	// 緯度
	Latitude float64 `form:"latitude" json:"latitude" yaml:"latitude" xml:"latitude"`
	// 経度
	Longitude float64 `form:"longitude" json:"longitude" yaml:"longitude" xml:"longitude"`
	// 更新日
	UpdatedAt int64 `form:"updated_at" json:"updated_at" yaml:"updated_at" xml:"updated_at"`
}

ポッド (default view)

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

func (*Pod) Validate

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

Validate validates the Pod media type instance.

type PodCollection

type PodCollection []*Pod

PodCollection is the media type for an array of Pod (default view)

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

func (PodCollection) Validate

func (mt PodCollection) Validate() (err error)

Validate validates the PodCollection media type instance.

type PodCreated

type PodCreated struct {
	// コード
	Code string `form:"code" json:"code" yaml:"code" xml:"code"`
	// 作成日
	CreatedAt int64 `form:"created_at" json:"created_at" yaml:"created_at" xml:"created_at"`
	// ID
	ID int64 `form:"id" json:"id" yaml:"id" xml:"id"`
	// 緯度
	Latitude float64 `form:"latitude" json:"latitude" yaml:"latitude" xml:"latitude"`
	// 経度
	Longitude float64 `form:"longitude" json:"longitude" yaml:"longitude" xml:"longitude"`
	// トークン
	Token string `form:"token" json:"token" yaml:"token" xml:"token"`
	// 更新日
	UpdatedAt int64 `form:"updated_at" json:"updated_at" yaml:"updated_at" xml:"updated_at"`
}

ポッド作成成功 (default view)

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

func (*PodCreated) Validate

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

Validate validates the PodCreated media type instance.

type PodsController

type PodsController interface {
	goa.Muxer
	Add(*AddPodsContext) error
	List(*ListPodsContext) error
	PeersList(*PeersListPodsContext) error
	RegenerateToken(*RegenerateTokenPodsContext) error
	Show(*ShowPodsContext) error
	ShowByToken(*ShowByTokenPodsContext) error
	Update(*UpdatePodsContext) error
}

PodsController is the controller interface for the Pods actions.

type ProfileAccountContext

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

ProfileAccountContext provides the account profile action context.

func NewProfileAccountContext

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

NewProfileAccountContext parses the incoming request URL and body, performs validations and creates the context used by the account controller profile action.

func (*ProfileAccountContext) InternalServerError

func (ctx *ProfileAccountContext) InternalServerError(r error) error

InternalServerError sends a HTTP response with status code 500.

func (*ProfileAccountContext) NotFound

func (ctx *ProfileAccountContext) NotFound(r error) error

NotFound sends a HTTP response with status code 404.

func (*ProfileAccountContext) OK

func (ctx *ProfileAccountContext) OK(r *User) error

OK sends a HTTP response with status code 200.

type ReceivePeerLocationWebsocketContext

type ReceivePeerLocationWebsocketContext struct {
	context.Context
	*goa.ResponseData
	*goa.RequestData
	Token string
}

ReceivePeerLocationWebsocketContext provides the websocket receive peer location action context.

func NewReceivePeerLocationWebsocketContext

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

NewReceivePeerLocationWebsocketContext parses the incoming request URL and body, performs validations and creates the context used by the websocket controller receive peer location action.

type RegenerateTokenPeersContext

type RegenerateTokenPeersContext struct {
	context.Context
	*goa.ResponseData
	*goa.RequestData
	ID int
}

RegenerateTokenPeersContext provides the peers regenerate token action context.

func NewRegenerateTokenPeersContext

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

NewRegenerateTokenPeersContext parses the incoming request URL and body, performs validations and creates the context used by the peers controller regenerate token action.

func (*RegenerateTokenPeersContext) BadRequest

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

BadRequest sends a HTTP response with status code 400.

func (*RegenerateTokenPeersContext) InternalServerError

func (ctx *RegenerateTokenPeersContext) InternalServerError(r error) error

InternalServerError sends a HTTP response with status code 500.

func (*RegenerateTokenPeersContext) NotFound

func (ctx *RegenerateTokenPeersContext) NotFound(r error) error

NotFound sends a HTTP response with status code 404.

func (*RegenerateTokenPeersContext) OK

OK sends a HTTP response with status code 200.

type RegenerateTokenPodsContext

type RegenerateTokenPodsContext struct {
	context.Context
	*goa.ResponseData
	*goa.RequestData
	ID int
}

RegenerateTokenPodsContext provides the pods regenerate token action context.

func NewRegenerateTokenPodsContext

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

NewRegenerateTokenPodsContext parses the incoming request URL and body, performs validations and creates the context used by the pods controller regenerate token action.

func (*RegenerateTokenPodsContext) BadRequest

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

BadRequest sends a HTTP response with status code 400.

func (*RegenerateTokenPodsContext) InternalServerError

func (ctx *RegenerateTokenPodsContext) InternalServerError(r error) error

InternalServerError sends a HTTP response with status code 500.

func (*RegenerateTokenPodsContext) NotFound

func (ctx *RegenerateTokenPodsContext) NotFound(r error) error

NotFound sends a HTTP response with status code 404.

func (*RegenerateTokenPodsContext) OK

OK sends a HTTP response with status code 200.

type SendCurrentPeerLocationWebsocketContext

type SendCurrentPeerLocationWebsocketContext struct {
	context.Context
	*goa.ResponseData
	*goa.RequestData
	Token string
}

SendCurrentPeerLocationWebsocketContext provides the websocket send current peer location action context.

func NewSendCurrentPeerLocationWebsocketContext

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

NewSendCurrentPeerLocationWebsocketContext parses the incoming request URL and body, performs validations and creates the context used by the websocket controller send current peer location action.

type SendLocationPeersContext

type SendLocationPeersContext struct {
	context.Context
	*goa.ResponseData
	*goa.RequestData
	ID      int
	Payload *SendLocationPeersPayload
}

SendLocationPeersContext provides the peers send location action context.

func NewSendLocationPeersContext

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

NewSendLocationPeersContext parses the incoming request URL and body, performs validations and creates the context used by the peers controller send location action.

func (*SendLocationPeersContext) BadRequest

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

BadRequest sends a HTTP response with status code 400.

func (*SendLocationPeersContext) Created

Created sends a HTTP response with status code 201.

func (*SendLocationPeersContext) Forbidden

func (ctx *SendLocationPeersContext) Forbidden(r error) error

Forbidden sends a HTTP response with status code 403.

func (*SendLocationPeersContext) InternalServerError

func (ctx *SendLocationPeersContext) InternalServerError(r error) error

InternalServerError sends a HTTP response with status code 500.

func (*SendLocationPeersContext) NotFound

func (ctx *SendLocationPeersContext) NotFound(r error) error

NotFound sends a HTTP response with status code 404.

type SendLocationPeersPayload

type SendLocationPeersPayload struct {
	// 緯度
	Latitude float64 `form:"latitude" json:"latitude" yaml:"latitude" xml:"latitude"`
	// スクリーンネーム
	Longitude float64 `form:"longitude" json:"longitude" yaml:"longitude" xml:"longitude"`
	// ピアトークン
	Token string `form:"token" json:"token" yaml:"token" xml:"token"`
}

SendLocationPeersPayload is the peers send location action payload.

func (*SendLocationPeersPayload) Validate

func (payload *SendLocationPeersPayload) Validate() (err error)

Validate runs the validation rules defined in the design.

type ShowByTokenPeersContext

type ShowByTokenPeersContext struct {
	context.Context
	*goa.ResponseData
	*goa.RequestData
	Token string
}

ShowByTokenPeersContext provides the peers show by token action context.

func NewShowByTokenPeersContext

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

NewShowByTokenPeersContext parses the incoming request URL and body, performs validations and creates the context used by the peers controller show by token action.

func (*ShowByTokenPeersContext) InternalServerError

func (ctx *ShowByTokenPeersContext) InternalServerError(r error) error

InternalServerError sends a HTTP response with status code 500.

func (*ShowByTokenPeersContext) NotFound

func (ctx *ShowByTokenPeersContext) NotFound(r error) error

NotFound sends a HTTP response with status code 404.

func (*ShowByTokenPeersContext) OK

func (ctx *ShowByTokenPeersContext) OK(r *Peer) error

OK sends a HTTP response with status code 200.

type ShowByTokenPodsContext

type ShowByTokenPodsContext struct {
	context.Context
	*goa.ResponseData
	*goa.RequestData
	Token string
}

ShowByTokenPodsContext provides the pods show by token action context.

func NewShowByTokenPodsContext

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

NewShowByTokenPodsContext parses the incoming request URL and body, performs validations and creates the context used by the pods controller show by token action.

func (*ShowByTokenPodsContext) InternalServerError

func (ctx *ShowByTokenPodsContext) InternalServerError(r error) error

InternalServerError sends a HTTP response with status code 500.

func (*ShowByTokenPodsContext) NotFound

func (ctx *ShowByTokenPodsContext) NotFound(r error) error

NotFound sends a HTTP response with status code 404.

func (*ShowByTokenPodsContext) OK

func (ctx *ShowByTokenPodsContext) OK(r *Pod) error

OK sends a HTTP response with status code 200.

type ShowPeersContext

type ShowPeersContext struct {
	context.Context
	*goa.ResponseData
	*goa.RequestData
	ID int
}

ShowPeersContext provides the peers show action context.

func NewShowPeersContext

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

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

func (*ShowPeersContext) InternalServerError

func (ctx *ShowPeersContext) InternalServerError(r error) error

InternalServerError sends a HTTP response with status code 500.

func (*ShowPeersContext) NotFound

func (ctx *ShowPeersContext) NotFound(r error) error

NotFound sends a HTTP response with status code 404.

func (*ShowPeersContext) OK

func (ctx *ShowPeersContext) OK(r *Peer) error

OK sends a HTTP response with status code 200.

type ShowPodsContext

type ShowPodsContext struct {
	context.Context
	*goa.ResponseData
	*goa.RequestData
	ID int
}

ShowPodsContext provides the pods show action context.

func NewShowPodsContext

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

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

func (*ShowPodsContext) InternalServerError

func (ctx *ShowPodsContext) InternalServerError(r error) error

InternalServerError sends a HTTP response with status code 500.

func (*ShowPodsContext) NotFound

func (ctx *ShowPodsContext) NotFound(r error) error

NotFound sends a HTTP response with status code 404.

func (*ShowPodsContext) OK

func (ctx *ShowPodsContext) OK(r *Pod) error

OK sends a HTTP response with status code 200.

type ShowUsersContext

type ShowUsersContext struct {
	context.Context
	*goa.ResponseData
	*goa.RequestData
	ID int
}

ShowUsersContext provides the users show action context.

func NewShowUsersContext

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

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

func (*ShowUsersContext) InternalServerError

func (ctx *ShowUsersContext) InternalServerError(r error) error

InternalServerError sends a HTTP response with status code 500.

func (*ShowUsersContext) NotFound

func (ctx *ShowUsersContext) NotFound(r error) error

NotFound sends a HTTP response with status code 404.

func (*ShowUsersContext) OK

func (ctx *ShowUsersContext) OK(r *User) error

OK sends a HTTP response with status code 200.

type SwaggerController

type SwaggerController interface {
	goa.Muxer
	goa.FileServer
}

SwaggerController is the controller interface for the Swagger actions.

type Token

type Token struct {
	// 対象ID
	ID uint64 `form:"id" json:"id" yaml:"id" xml:"id"`
	// トークン
	Token string `form:"token" json:"token" yaml:"token" xml:"token"`
	// 更新日
	UpdatedAt int64 `form:"updated_at" json:"updated_at" yaml:"updated_at" xml:"updated_at"`
}

トークン (default view)

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

func (*Token) Validate

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

Validate validates the Token media type instance.

type UpdatePasswordAccountContext

type UpdatePasswordAccountContext struct {
	context.Context
	*goa.ResponseData
	*goa.RequestData
	Payload *UpdatePasswordAccountPayload
}

UpdatePasswordAccountContext provides the account update password action context.

func NewUpdatePasswordAccountContext

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

NewUpdatePasswordAccountContext parses the incoming request URL and body, performs validations and creates the context used by the account controller update password action.

func (*UpdatePasswordAccountContext) BadRequest

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

BadRequest sends a HTTP response with status code 400.

func (*UpdatePasswordAccountContext) InternalServerError

func (ctx *UpdatePasswordAccountContext) InternalServerError(r error) error

InternalServerError sends a HTTP response with status code 500.

func (*UpdatePasswordAccountContext) NoContent

func (ctx *UpdatePasswordAccountContext) NoContent() error

NoContent sends a HTTP response with status code 204.

func (*UpdatePasswordAccountContext) NotFound

func (ctx *UpdatePasswordAccountContext) NotFound(r error) error

NotFound sends a HTTP response with status code 404.

type UpdatePasswordAccountPayload

type UpdatePasswordAccountPayload struct {
	// パスワード
	Password string `form:"password" json:"password" yaml:"password" xml:"password"`
}

UpdatePasswordAccountPayload is the account update password action payload.

func (*UpdatePasswordAccountPayload) Validate

func (payload *UpdatePasswordAccountPayload) Validate() (err error)

Validate runs the validation rules defined in the design.

type UpdatePeersContext

type UpdatePeersContext struct {
	context.Context
	*goa.ResponseData
	*goa.RequestData
	ID      int
	Payload *UpdatePeersPayload
}

UpdatePeersContext provides the peers update action context.

func NewUpdatePeersContext

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

NewUpdatePeersContext parses the incoming request URL and body, performs validations and creates the context used by the peers controller update action.

func (*UpdatePeersContext) BadRequest

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

BadRequest sends a HTTP response with status code 400.

func (*UpdatePeersContext) InternalServerError

func (ctx *UpdatePeersContext) InternalServerError(r error) error

InternalServerError sends a HTTP response with status code 500.

func (*UpdatePeersContext) NoContent

func (ctx *UpdatePeersContext) NoContent() error

NoContent sends a HTTP response with status code 204.

func (*UpdatePeersContext) NotFound

func (ctx *UpdatePeersContext) NotFound(r error) error

NotFound sends a HTTP response with status code 404.

type UpdatePeersPayload

type UpdatePeersPayload struct {
	// コード
	Code *string `form:"code,omitempty" json:"code,omitempty" yaml:"code,omitempty" xml:"code,omitempty"`
}

UpdatePeersPayload is the peers update action payload.

type UpdatePodsContext

type UpdatePodsContext struct {
	context.Context
	*goa.ResponseData
	*goa.RequestData
	ID      int
	Payload *UpdatePodsPayload
}

UpdatePodsContext provides the pods update action context.

func NewUpdatePodsContext

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

NewUpdatePodsContext parses the incoming request URL and body, performs validations and creates the context used by the pods controller update action.

func (*UpdatePodsContext) BadRequest

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

BadRequest sends a HTTP response with status code 400.

func (*UpdatePodsContext) InternalServerError

func (ctx *UpdatePodsContext) InternalServerError(r error) error

InternalServerError sends a HTTP response with status code 500.

func (*UpdatePodsContext) NoContent

func (ctx *UpdatePodsContext) NoContent() error

NoContent sends a HTTP response with status code 204.

func (*UpdatePodsContext) NotFound

func (ctx *UpdatePodsContext) NotFound(r error) error

NotFound sends a HTTP response with status code 404.

type UpdatePodsPayload

type UpdatePodsPayload struct {
	// コード
	Code *string `form:"code,omitempty" json:"code,omitempty" yaml:"code,omitempty" xml:"code,omitempty"`
	// 緯度
	Latitude *float64 `form:"latitude,omitempty" json:"latitude,omitempty" yaml:"latitude,omitempty" xml:"latitude,omitempty"`
	// 経度
	Longitude *float64 `form:"longitude,omitempty" json:"longitude,omitempty" yaml:"longitude,omitempty" xml:"longitude,omitempty"`
}

UpdatePodsPayload is the pods update action payload.

type User

type User struct {
	// 作成日
	CreatedAt int64 `form:"created_at" json:"created_at" yaml:"created_at" xml:"created_at"`
	// ID
	ID uint64 `form:"id" json:"id" yaml:"id" xml:"id"`
	// スクリーンネーム
	ScreenName string `form:"screen_name" json:"screen_name" yaml:"screen_name" xml:"screen_name"`
	// 更新日
	UpdatedAt int64 `form:"updated_at" json:"updated_at" yaml:"updated_at" xml:"updated_at"`
}

ユーザー (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 UsersController

type UsersController interface {
	goa.Muxer
	Add(*AddUsersContext) error
	List(*ListUsersContext) error
	Show(*ShowUsersContext) error
}

UsersController is the controller interface for the Users actions.

type WebsocketController

type WebsocketController interface {
	goa.Muxer
	ReceivePeerLocation(*ReceivePeerLocationWebsocketContext) error
	SendCurrentPeerLocation(*SendCurrentPeerLocationWebsocketContext) error
}

WebsocketController is the controller interface for the Websocket actions.

type WsError

type WsError struct {
	// エラーコード
	Code string `form:"code" json:"code" yaml:"code" xml:"code"`
	// エラーメッセージ
	Message string `form:"message" json:"message" yaml:"message" xml:"message"`
	// タイプ
	Type string `form:"type" json:"type" yaml:"type" xml:"type"`
}

WebSocketエラー (default view)

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

func (*WsError) Validate

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

Validate validates the WsError media type instance.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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