Documentation
¶
Index ¶
- func DeleteRatingPath(movieID int, userID int) string
- func HealthHealthPath() string
- func ReadRatingPath(movieID int, userID int) string
- func UpsertRatingPath() string
- type Client
- func (c *Client) DecodeRating(resp *http.Response) (*Rating, error)
- func (c *Client) DeleteRating(ctx context.Context, path string) (*http.Response, error)
- func (c *Client) DownloadSwaggerJSON(ctx context.Context, dest string) (int64, error)
- func (c *Client) HealthHealth(ctx context.Context, path string) (*http.Response, error)
- func (c *Client) NewDeleteRatingRequest(ctx context.Context, path string) (*http.Request, error)
- func (c *Client) NewHealthHealthRequest(ctx context.Context, path string) (*http.Request, error)
- func (c *Client) NewReadRatingRequest(ctx context.Context, path string) (*http.Request, error)
- func (c *Client) NewUpsertRatingRequest(ctx context.Context, path string, payload *RatingPayload, contentType string) (*http.Request, error)
- func (c *Client) ReadRating(ctx context.Context, path string) (*http.Response, error)
- func (c *Client) UpsertRating(ctx context.Context, path string, payload *RatingPayload, contentType string) (*http.Response, error)
- type Rating
- type RatingPayload
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteRatingPath ¶
DeleteRatingPath computes a request path to the delete action of rating.
func HealthHealthPath ¶
func HealthHealthPath() string
HealthHealthPath computes a request path to the health action of health.
func ReadRatingPath ¶
ReadRatingPath computes a request path to the read action of rating.
func UpsertRatingPath ¶
func UpsertRatingPath() string
UpsertRatingPath computes a request path to the upsert action of rating.
Types ¶
type Client ¶
type Client struct { *goaclient.Client Encoder *goa.HTTPEncoder Decoder *goa.HTTPDecoder }
Client is the db service client.
func (*Client) DecodeRating ¶
DecodeRating decodes the Rating instance encoded in resp body.
func (*Client) DeleteRating ¶
Delete rating record
func (*Client) DownloadSwaggerJSON ¶
DownloadSwaggerJSON downloads swagger.json and writes it to the file dest. It returns the number of bytes downloaded in case of success.
func (*Client) HealthHealth ¶
Status of the API.
func (*Client) NewDeleteRatingRequest ¶
NewDeleteRatingRequest create the request corresponding to the delete action endpoint of the rating resource.
func (*Client) NewHealthHealthRequest ¶
NewHealthHealthRequest create the request corresponding to the health action endpoint of the health resource.
func (*Client) NewReadRatingRequest ¶
NewReadRatingRequest create the request corresponding to the read action endpoint of the rating resource.
func (*Client) NewUpsertRatingRequest ¶
func (c *Client) NewUpsertRatingRequest(ctx context.Context, path string, payload *RatingPayload, contentType string) (*http.Request, error)
NewUpsertRatingRequest create the request corresponding to the upsert action endpoint of the rating resource.
func (*Client) ReadRating ¶
Retrieves a rating record
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 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.