Documentation
¶
Index ¶
- func ApplyMatchMatchesPath() string
- func DecodeApplyMatchRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (interface{}, error)
- func EncodeApplyMatchResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, interface{}) error
- func Mount(mux goahttp.Muxer, h *Server)
- func MountApplyMatchHandler(mux goahttp.Muxer, h http.Handler)
- func NewApplyMatchHandler(endpoint goa.Endpoint, mux goahttp.Muxer, ...) http.Handler
- func NewApplyMatchPayload(body *ApplyMatchRequestBody) *matches.ApplyMatchPayload
- func ValidateApplyMatchRequestBody(body *ApplyMatchRequestBody) (err error)
- func ValidateRatingResourceResponseBody(body *RatingResourceResponseBody) (err error)
- type ApplyMatchRequestBody
- type ApplyMatchResponseBody
- type ErrorNamer
- type MountPoint
- type RatingResourceResponseBody
- type RatingResponseBody
- type Server
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyMatchMatchesPath ¶
func ApplyMatchMatchesPath() string
ApplyMatchMatchesPath returns the URL path to the Matches service Apply match HTTP endpoint.
func DecodeApplyMatchRequest ¶
func DecodeApplyMatchRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (interface{}, error)
DecodeApplyMatchRequest returns a decoder for requests sent to the Matches Apply match endpoint.
func EncodeApplyMatchResponse ¶
func EncodeApplyMatchResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, interface{}) error
EncodeApplyMatchResponse returns an encoder for responses returned by the Matches Apply match endpoint.
func MountApplyMatchHandler ¶
MountApplyMatchHandler configures the mux to serve the "Matches" service "Apply match" endpoint.
func NewApplyMatchHandler ¶
func NewApplyMatchHandler( endpoint goa.Endpoint, mux goahttp.Muxer, dec func(*http.Request) goahttp.Decoder, enc func(context.Context, http.ResponseWriter) goahttp.Encoder, eh func(context.Context, http.ResponseWriter, error), ) http.Handler
NewApplyMatchHandler creates a HTTP handler which loads the HTTP request and calls the "Matches" service "Apply match" endpoint.
func NewApplyMatchPayload ¶
func NewApplyMatchPayload(body *ApplyMatchRequestBody) *matches.ApplyMatchPayload
NewApplyMatchPayload builds a Matches service Apply match endpoint payload.
func ValidateApplyMatchRequestBody ¶
func ValidateApplyMatchRequestBody(body *ApplyMatchRequestBody) (err error)
ValidateApplyMatchRequestBody runs the validations defined on Apply MatchRequestBody
func ValidateRatingResourceResponseBody ¶
func ValidateRatingResourceResponseBody(body *RatingResourceResponseBody) (err error)
ValidateRatingResourceResponseBody runs the validations defined on RatingResourceResponseBody
Types ¶
type ApplyMatchRequestBody ¶
type ApplyMatchRequestBody struct {
Scores map[string]float64 `form:"scores,omitempty" json:"scores,omitempty" xml:"scores,omitempty"`
}
ApplyMatchRequestBody is the type of the "Matches" service "Apply match" endpoint HTTP request body.
type ApplyMatchResponseBody ¶
type ApplyMatchResponseBody struct {
Participants []*RatingResourceResponseBody `form:"participants" json:"participants" xml:"participants"`
}
ApplyMatchResponseBody is the type of the "Matches" service "Apply match" endpoint HTTP response body.
func NewApplyMatchResponseBody ¶
func NewApplyMatchResponseBody(res *matchesviews.RestratingMatchView) *ApplyMatchResponseBody
NewApplyMatchResponseBody builds the HTTP response body from the result of the "Apply match" endpoint of the "Matches" service.
type ErrorNamer ¶
type ErrorNamer interface {
ErrorName() string
}
ErrorNamer is an interface implemented by generated error structs that exposes the name of the error as defined in the design.
type MountPoint ¶
type MountPoint struct { // Method is the name of the service method served by the mounted HTTP handler. Method string // Verb is the HTTP method used to match requests to the mounted handler. Verb string // Pattern is the HTTP request path pattern used to match requests to the // mounted handler. Pattern string }
MountPoint holds information about the mounted endpoints.
type RatingResourceResponseBody ¶
type RatingResourceResponseBody struct { // Rating Resource Name Rrn string `form:"rrn" json:"rrn" xml:"rrn"` // players strength Rating *RatingResponseBody `form:"rating" json:"rating" xml:"rating"` }
RatingResourceResponseBody is used to define fields on response body types.
type RatingResponseBody ¶
type RatingResponseBody struct { Strength float64 `form:"strength" json:"strength" xml:"strength"` Lower float64 `form:"lower" json:"lower" xml:"lower"` Upper float64 `form:"upper" json:"upper" xml:"upper"` }
RatingResponseBody is used to define fields on response body types.
type Server ¶
type Server struct { Mounts []*MountPoint ApplyMatch http.Handler }
Server lists the Matches service endpoint HTTP handlers.
func New ¶
func New( e *matches.Endpoints, mux goahttp.Muxer, dec func(*http.Request) goahttp.Decoder, enc func(context.Context, http.ResponseWriter) goahttp.Encoder, eh func(context.Context, http.ResponseWriter, error), ) *Server
New instantiates HTTP handlers for all the Matches service endpoints.