Documentation ¶
Index ¶
- func MountHealthController(service *goa.Service, ctrl HealthController)
- func MountRatingController(service *goa.Service, ctrl RatingController)
- func MountSwaggerController(service *goa.Service, ctrl SwaggerController)
- type DeleteRatingContext
- type HealthController
- type HealthHealthContext
- type Rating
- type RatingController
- type RatingPayload
- type ReadRatingContext
- type SwaggerController
- type UpsertRatingContext
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 MountRatingController ¶
func MountRatingController(service *goa.Service, ctrl RatingController)
MountRatingController "mounts" a Rating 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.
Types ¶
type DeleteRatingContext ¶
type DeleteRatingContext struct { context.Context *goa.ResponseData *goa.RequestData MovieID int UserID int }
DeleteRatingContext provides the rating delete action context.
func NewDeleteRatingContext ¶
func NewDeleteRatingContext(ctx context.Context, r *http.Request, service *goa.Service) (*DeleteRatingContext, error)
NewDeleteRatingContext parses the incoming request URL and body, performs validations and creates the context used by the rating controller delete action.
func (*DeleteRatingContext) Accepted ¶
func (ctx *DeleteRatingContext) Accepted() error
Accepted sends a HTTP response with status code 202.
func (*DeleteRatingContext) InternalServerError ¶
func (ctx *DeleteRatingContext) InternalServerError() error
InternalServerError sends a HTTP response with status code 500.
type HealthController ¶
type HealthController interface { goa.Muxer Health(*HealthHealthContext) error }
HealthController is the controller interface for the Health actions.
type HealthHealthContext ¶
type HealthHealthContext struct { context.Context *goa.ResponseData *goa.RequestData }
HealthHealthContext provides the health health action context.
func NewHealthHealthContext ¶
func NewHealthHealthContext(ctx context.Context, r *http.Request, service *goa.Service) (*HealthHealthContext, error)
NewHealthHealthContext parses the incoming request URL and body, performs validations and creates the context used by the health controller health action.
func (*HealthHealthContext) OK ¶
func (ctx *HealthHealthContext) OK(resp []byte) error
OK sends a HTTP response with status code 200.
type Rating ¶
type Rating struct { MovieID int `form:"movieId" json:"movieId" xml:"movieId"` Rating float64 `form:"rating" json:"rating" xml:"rating"` UserID int `form:"userId" json:"userId" xml:"userId"` }
A movie rating by a user (default view)
Identifier: application/cassandra.wannabe.rating+json; view=default
type RatingController ¶
type RatingController interface { goa.Muxer Delete(*DeleteRatingContext) error Read(*ReadRatingContext) error Upsert(*UpsertRatingContext) error }
RatingController is the controller interface for the Rating actions.
type RatingPayload ¶
type RatingPayload struct { MovieID int `form:"movieId" json:"movieId" xml:"movieId"` Rating float64 `form:"rating" json:"rating" xml:"rating"` UserID int `form:"userId" json:"userId" xml:"userId"` }
RatingPayload user type.
func (*RatingPayload) Validate ¶
func (ut *RatingPayload) Validate() (err error)
Validate validates the RatingPayload type instance.
type ReadRatingContext ¶
type ReadRatingContext struct { context.Context *goa.ResponseData *goa.RequestData MovieID int UserID int }
ReadRatingContext provides the rating read action context.
func NewReadRatingContext ¶
func NewReadRatingContext(ctx context.Context, r *http.Request, service *goa.Service) (*ReadRatingContext, error)
NewReadRatingContext parses the incoming request URL and body, performs validations and creates the context used by the rating controller read action.
func (*ReadRatingContext) InternalServerError ¶
func (ctx *ReadRatingContext) InternalServerError() error
InternalServerError sends a HTTP response with status code 500.
func (*ReadRatingContext) NotFound ¶
func (ctx *ReadRatingContext) NotFound() error
NotFound sends a HTTP response with status code 404.
func (*ReadRatingContext) OK ¶
func (ctx *ReadRatingContext) OK(r *Rating) 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 UpsertRatingContext ¶
type UpsertRatingContext struct { context.Context *goa.ResponseData *goa.RequestData Payload *RatingPayload }
UpsertRatingContext provides the rating upsert action context.
func NewUpsertRatingContext ¶
func NewUpsertRatingContext(ctx context.Context, r *http.Request, service *goa.Service) (*UpsertRatingContext, error)
NewUpsertRatingContext parses the incoming request URL and body, performs validations and creates the context used by the rating controller upsert action.
func (*UpsertRatingContext) InternalServerError ¶
func (ctx *UpsertRatingContext) InternalServerError() error
InternalServerError sends a HTTP response with status code 500.
func (*UpsertRatingContext) NoContent ¶
func (ctx *UpsertRatingContext) NoContent() error
NoContent sends a HTTP response with status code 204.