client

package
v0.0.0-...-d31d36d Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildHelloEndpointPayload

func BuildHelloEndpointPayload(helloHelloGreeting string) (*hello.HelloPayload, error)

BuildHelloEndpointPayload builds the payload for the hello hello endpoint from CLI flags.

func DecodeHelloEndpointResponse

func DecodeHelloEndpointResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (any, error)

DecodeHelloEndpointResponse returns a decoder for responses returned by the hello hello endpoint. restoreBody controls whether the response body should be restored after having been read.

func HelloEndpointHelloPath

func HelloEndpointHelloPath(greeting string) string

HelloEndpointHelloPath returns the URL path to the hello service hello HTTP endpoint.

func NewHelloViewAccepted

func NewHelloViewAccepted(body *HelloAcceptedResponseBody) *helloviews.HelloView

NewHelloViewAccepted builds a "hello" service "hello" endpoint result from a HTTP "Accepted" response.

func NewHelloViewCreated

func NewHelloViewCreated(body *HelloCreatedResponseBody) *helloviews.HelloView

NewHelloViewCreated builds a "hello" service "hello" endpoint result from a HTTP "Created" response.

func NewHelloViewOK

func NewHelloViewOK(body *HelloOKResponseBody) *helloviews.HelloView

NewHelloViewOK builds a "hello" service "hello" endpoint result from a HTTP "OK" response.

Types

type Client

type Client struct {
	// HelloEndpoint Doer is the HTTP client used to make requests to the hello
	// endpoint.
	HelloEndpointDoer 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 hello 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 hello service servers.

func (*Client) BuildHelloEndpointRequest

func (c *Client) BuildHelloEndpointRequest(ctx context.Context, v any) (*http.Request, error)

BuildHelloEndpointRequest instantiates a HTTP request object with method and path set to call the "hello" service "hello" endpoint

func (*Client) HelloEndpoint

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

HelloEndpoint returns an endpoint that makes HTTP requests to the hello service hello server.

type HelloAcceptedResponseBody

type HelloAcceptedResponseBody struct {
	// The greeting message
	Greeting *string `form:"greeting,omitempty" json:"greeting,omitempty" xml:"greeting,omitempty"`
	Outcome  *string `json:"-"`
}

HelloAcceptedResponseBody is the type of the "hello" service "hello" endpoint HTTP response body.

type HelloCreatedResponseBody

type HelloCreatedResponseBody struct {
	// The greeting message
	Greeting *string `form:"greeting,omitempty" json:"greeting,omitempty" xml:"greeting,omitempty"`
	Outcome  *string `json:"-"`
}

HelloCreatedResponseBody is the type of the "hello" service "hello" endpoint HTTP response body.

type HelloOKResponseBody

type HelloOKResponseBody struct {
	// The greeting message
	Greeting *string `form:"greeting,omitempty" json:"greeting,omitempty" xml:"greeting,omitempty"`
	Outcome  *string `json:"-"`
}

HelloOKResponseBody is the type of the "hello" service "hello" endpoint HTTP response body.

Jump to

Keyboard shortcuts

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