Documentation ¶
Index ¶
Constants ¶
const ServiceName = "Matches"
ServiceName is the name of the service as defined in the design. This is the same value that is set in the endpoint request contexts under the ServiceKey key.
Variables ¶
var MethodNames = [1]string{"Apply match"}
MethodNames lists the service method names as defined in the design. These are the same values that are set in the endpoint request contexts under the MethodKey key.
Functions ¶
func NewApplyMatchEndpoint ¶
NewApplyMatchEndpoint returns an endpoint function that calls the method "Apply match" of service "Matches".
func NewViewedRestratingMatch ¶
func NewViewedRestratingMatch(res *RestratingMatch, view string) *matchesviews.RestratingMatch
NewViewedRestratingMatch initializes viewed result type RestratingMatch from result type RestratingMatch using the given view.
Types ¶
type ApplyMatchPayload ¶
ApplyMatchPayload is the payload type of the Matches service Apply match method.
type Client ¶
Client is the "Matches" service client.
func (*Client) ApplyMatch ¶
func (c *Client) ApplyMatch(ctx context.Context, p *ApplyMatchPayload) (res *RestratingMatch, err error)
ApplyMatch calls the "Apply match" endpoint of the "Matches" service.
type Endpoints ¶
Endpoints wraps the "Matches" service endpoints.
func NewEndpoints ¶
NewEndpoints wraps the methods of the "Matches" service with endpoints.
type RatingResource ¶
type RatingResource struct { // Rating Resource Name Rrn string // players strength Rating *Rating }
RatingResource describes a strength information.
type RestratingMatch ¶
type RestratingMatch struct {
Participants []*RatingResource
}
RestratingMatch is the result type of the Matches service Apply match method.
func NewRestratingMatch ¶
func NewRestratingMatch(vres *matchesviews.RestratingMatch) *RestratingMatch
NewRestratingMatch initializes result type RestratingMatch from viewed result type RestratingMatch.
type Service ¶
type Service interface { // Apply match and return RatingResources ApplyMatch(context.Context, *ApplyMatchPayload) (res *RestratingMatch, err error) }
Matches serves a learning function of Rating from match results