client

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeTestResponse

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

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

func TestTestPath

func TestTestPath() string

TestTestPath returns the URL path to the test service test HTTP endpoint.

Types

type Client

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

func (*Client) BuildTestRequest

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

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

func (*Client) Test

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

Test returns an endpoint that makes HTTP requests to the test service test server.

Jump to

Keyboard shortcuts

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