client

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: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildCreatePlayerPayload

func BuildCreatePlayerPayload(playersCreatePlayerBody string) (*players.CreatePlayerPayload, error)

BuildCreatePlayerPayload builds the payload for the Players create player endpoint from CLI flags.

func CreatePlayerPlayersPath

func CreatePlayerPlayersPath() string

CreatePlayerPlayersPath returns the URL path to the Players service create player HTTP endpoint.

func DecodeCreatePlayerResponse

func DecodeCreatePlayerResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (interface{}, error)

DecodeCreatePlayerResponse returns a decoder for responses returned by the Players create player endpoint. restoreBody controls whether the response body should be restored after having been read.

func EncodeCreatePlayerRequest

func EncodeCreatePlayerRequest(encoder func(*http.Request) goahttp.Encoder) func(*http.Request, interface{}) error

EncodeCreatePlayerRequest returns an encoder for requests sent to the Players create player server.

func NewCreatePlayerRestratingRrnCreated

func NewCreatePlayerRestratingRrnCreated(body *CreatePlayerResponseBody) *playersviews.RestratingRrnView

NewCreatePlayerRestratingRrnCreated builds a "Players" service "create player" endpoint result from a HTTP "Created" response.

Types

type Client

type Client struct {
	// CreatePlayer Doer is the HTTP client used to make requests to the create
	// player endpoint.
	CreatePlayerDoer goahttp.Doer

	// RestoreResponseBody controls whether the response bodies are reset after
	// decoding so they can be read again.
	RestoreResponseBody bool
	// contains filtered or unexported fields
}

Client lists the Players service endpoint HTTP clients.

func NewClient

func NewClient(
	scheme string,
	host string,
	doer goahttp.Doer,
	enc func(*http.Request) goahttp.Encoder,
	dec func(*http.Response) goahttp.Decoder,
	restoreBody bool,
) *Client

NewClient instantiates HTTP clients for all the Players service servers.

func (*Client) BuildCreatePlayerRequest

func (c *Client) BuildCreatePlayerRequest(ctx context.Context, v interface{}) (*http.Request, error)

BuildCreatePlayerRequest instantiates a HTTP request object with method and path set to call the "Players" service "create player" endpoint

func (*Client) CreatePlayer

func (c *Client) CreatePlayer() goa.Endpoint

CreatePlayer returns an endpoint that makes HTTP requests to the Players service create player server.

type CreatePlayerRequestBody

type CreatePlayerRequestBody struct {
	Name string `form:"name" json:"name" xml:"name"`
}

CreatePlayerRequestBody is the type of the "Players" service "create player" endpoint HTTP request body.

func NewCreatePlayerRequestBody

func NewCreatePlayerRequestBody(p *players.CreatePlayerPayload) *CreatePlayerRequestBody

NewCreatePlayerRequestBody builds the HTTP request body from the payload of the "create player" endpoint of the "Players" service.

type CreatePlayerResponseBody

type CreatePlayerResponseBody struct {
	// Rating Resource Name
	Rrn *string `form:"rrn,omitempty" json:"rrn,omitempty" xml:"rrn,omitempty"`
}

CreatePlayerResponseBody is the type of the "Players" service "create player" endpoint HTTP response body.

Jump to

Keyboard shortcuts

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