client

package
v0.0.0-...-63cd2eb Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildDefaultPayload

func BuildDefaultPayload(defaultServiceDefaultUsername string, defaultServiceDefaultPassword string) (*defaultservice.DefaultPayload, error)

BuildDefaultPayload builds the payload for the default_service default endpoint from CLI flags.

func DecodeDefaultResponse

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

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

func DefaultDefaultServicePath

func DefaultDefaultServicePath() string

DefaultDefaultServicePath returns the URL path to the default_service service default HTTP endpoint.

func EncodeDefaultRequest

func EncodeDefaultRequest(encoder func(*http.Request) goahttp.Encoder) func(*http.Request, any) error

EncodeDefaultRequest returns an encoder for requests sent to the default_service default server.

Types

type Client

type Client struct {
	// Default Doer is the HTTP client used to make requests to the default
	// endpoint.
	DefaultDoer 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 default_service 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 default_service service servers.

func (*Client) BuildDefaultRequest

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

BuildDefaultRequest instantiates a HTTP request object with method and path set to call the "default_service" service "default" endpoint

func (*Client) Default

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

Default returns an endpoint that makes HTTP requests to the default_service service default server.

Jump to

Keyboard shortcuts

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