Documentation
¶
Index ¶
- func BuildExportPayload(infohubExportExportName string) (*infohub.ExportRequest, error)
- func BuildImportPayload(infohubImportBody string) (*infohub.ImportRequest, error)
- func DecodeExportResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (any, error)
- func DecodeImportResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (any, error)
- func EncodeImportRequest(encoder func(*http.Request) goahttp.Encoder) func(*http.Request, any) error
- func ExportInfohubPath(exportName string) string
- func ImportInfohubPath() string
- func NewImportResultOK(body *ImportResponseBody) *infohub.ImportResult
- func ValidateImportResponseBody(body *ImportResponseBody) (err error)
- type Client
- type ImportResponseBody
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildExportPayload ¶
func BuildExportPayload(infohubExportExportName string) (*infohub.ExportRequest, error)
BuildExportPayload builds the payload for the infohub Export endpoint from CLI flags.
func BuildImportPayload ¶
func BuildImportPayload(infohubImportBody string) (*infohub.ImportRequest, error)
BuildImportPayload builds the payload for the infohub Import endpoint from CLI flags.
func DecodeExportResponse ¶
func DecodeExportResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (any, error)
DecodeExportResponse returns a decoder for responses returned by the infohub Export endpoint. restoreBody controls whether the response body should be restored after having been read.
func DecodeImportResponse ¶
func DecodeImportResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (any, error)
DecodeImportResponse returns a decoder for responses returned by the infohub Import endpoint. restoreBody controls whether the response body should be restored after having been read.
func EncodeImportRequest ¶
func EncodeImportRequest(encoder func(*http.Request) goahttp.Encoder) func(*http.Request, any) error
EncodeImportRequest returns an encoder for requests sent to the infohub Import server.
func ExportInfohubPath ¶
ExportInfohubPath returns the URL path to the infohub service Export HTTP endpoint.
func ImportInfohubPath ¶
func ImportInfohubPath() string
ImportInfohubPath returns the URL path to the infohub service Import HTTP endpoint.
func NewImportResultOK ¶
func NewImportResultOK(body *ImportResponseBody) *infohub.ImportResult
NewImportResultOK builds a "infohub" service "Import" endpoint result from a HTTP "OK" response.
func ValidateImportResponseBody ¶
func ValidateImportResponseBody(body *ImportResponseBody) (err error)
ValidateImportResponseBody runs the validations defined on ImportResponseBody
Types ¶
type Client ¶
type Client struct { // Export Doer is the HTTP client used to make requests to the Export endpoint. ExportDoer goahttp.Doer // Import Doer is the HTTP client used to make requests to the Import endpoint. ImportDoer 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 infohub 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 infohub service servers.
func (*Client) BuildExportRequest ¶
BuildExportRequest instantiates a HTTP request object with method and path set to call the "infohub" service "Export" endpoint
func (*Client) BuildImportRequest ¶
BuildImportRequest instantiates a HTTP request object with method and path set to call the "infohub" service "Import" endpoint
type ImportResponseBody ¶
type ImportResponseBody struct { // importIds is an array of unique identifiers used as Cache keys to retrieve // the imported data entries later. ImportIds []string `form:"importIds,omitempty" json:"importIds,omitempty" xml:"importIds,omitempty"` }
ImportResponseBody is the type of the "infohub" service "Import" endpoint HTTP response body.