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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildDefaultPayload

func BuildDefaultPayload(apiKeyServiceDefaultKey string) (*apikeyservice.DefaultPayload, error)

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

func BuildSecurePayload

func BuildSecurePayload(apiKeyServiceSecureToken string) (*apikeyservice.SecurePayload, error)

BuildSecurePayload builds the payload for the api_key_service secure 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 api_key_service default endpoint. restoreBody controls whether the response body should be restored after having been read.

func DecodeSecureResponse

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

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

func DefaultAPIKeyServicePath

func DefaultAPIKeyServicePath() string

DefaultAPIKeyServicePath returns the URL path to the api_key_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 api_key_service default server.

func EncodeSecureRequest

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

EncodeSecureRequest returns an encoder for requests sent to the api_key_service secure server.

func SecureAPIKeyServicePath

func SecureAPIKeyServicePath() string

SecureAPIKeyServicePath returns the URL path to the api_key_service service secure HTTP endpoint.

Types

type Client

type Client struct {
	// Default Doer is the HTTP client used to make requests to the default
	// endpoint.
	DefaultDoer goahttp.Doer

	// Secure Doer is the HTTP client used to make requests to the secure endpoint.
	SecureDoer 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 api_key_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 api_key_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 "api_key_service" service "default" endpoint

func (*Client) BuildSecureRequest

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

BuildSecureRequest instantiates a HTTP request object with method and path set to call the "api_key_service" service "secure" endpoint

func (*Client) Default

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

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

func (*Client) Secure

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

Secure returns an endpoint that makes HTTP requests to the api_key_service service secure server.

Jump to

Keyboard shortcuts

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