players

package
v0.0.0-...-998107f Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2019 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const ServiceName = "Players"

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

View Source
var MethodNames = [1]string{"create player"}

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 NewCreatePlayerEndpoint

func NewCreatePlayerEndpoint(s Service) goa.Endpoint

NewCreatePlayerEndpoint returns an endpoint function that calls the method "create player" of service "Players".

func NewViewedRestratingRrn

func NewViewedRestratingRrn(res *RestratingRrn, view string) *playersviews.RestratingRrn

NewViewedRestratingRrn initializes viewed result type RestratingRrn from result type RestratingRrn using the given view.

Types

type Client

type Client struct {
	CreatePlayerEndpoint goa.Endpoint
}

Client is the "Players" service client.

func NewClient

func NewClient(createPlayer goa.Endpoint) *Client

NewClient initializes a "Players" service client given the endpoints.

func (*Client) CreatePlayer

func (c *Client) CreatePlayer(ctx context.Context, p *CreatePlayerPayload) (res *RestratingRrn, err error)

CreatePlayer calls the "create player" endpoint of the "Players" service.

type CreatePlayerPayload

type CreatePlayerPayload struct {
	Name string
}

CreatePlayerPayload is the payload type of the Players service create player method.

type Endpoints

type Endpoints struct {
	CreatePlayer goa.Endpoint
}

Endpoints wraps the "Players" service endpoints.

func NewEndpoints

func NewEndpoints(s Service) *Endpoints

NewEndpoints wraps the methods of the "Players" service with endpoints.

func (*Endpoints) Use

func (e *Endpoints) Use(m func(goa.Endpoint) goa.Endpoint)

Use applies the given middleware to all the "Players" service endpoints.

type RestratingRrn

type RestratingRrn struct {
	// Rating Resource Name
	Rrn string
}

RestratingRrn is the result type of the Players service create player method.

func NewRestratingRrn

func NewRestratingRrn(vres *playersviews.RestratingRrn) *RestratingRrn

NewRestratingRrn initializes result type RestratingRrn from viewed result type RestratingRrn.

type Service

type Service interface {
	// Add new player and return its RRN(Rating Resource Name).
	CreatePlayer(context.Context, *CreatePlayerPayload) (res *RestratingRrn, err error)
}

Player serves an indicator of strength using Rating

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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