Newer
Older
// Code generated by goa v3.8.5, DO NOT EDIT.
//
// openapi client HTTP transport
//
// Command:
// $ goa gen
// gitlab.com/gaia-x/data-infrastructure-federation-services/tsa/signer/design
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
package client
import (
"net/http"
goahttp "goa.design/goa/v3/http"
)
// Client lists the openapi service endpoint HTTP clients.
type Client struct {
// RestoreResponseBody controls whether the response bodies are reset after
// decoding so they can be read again.
RestoreResponseBody bool
scheme string
host string
encoder func(*http.Request) goahttp.Encoder
decoder func(*http.Response) goahttp.Decoder
}
// NewClient instantiates HTTP clients for all the openapi service servers.
func NewClient(
scheme string,
host string,
doer goahttp.Doer,
enc func(*http.Request) goahttp.Encoder,
dec func(*http.Response) goahttp.Decoder,
restoreBody bool,
) *Client {
return &Client{
RestoreResponseBody: restoreBody,
scheme: scheme,
host: host,
decoder: dec,
encoder: enc,
}
}