Documentation
¶
Overview ¶
Package gentest provides primitives to interact with the openapi HTTP API.
Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.8.0 DO NOT EDIT.
Index ¶
- func NewCreateEricTestSimulationRequest(server string, tenantId Tenant, productId Product, ...) (*http.Request, error)
- func NewCreateEricTestSimulationRequestWithBody(server string, tenantId Tenant, productId Product, ...) (*http.Request, error)
- func NewGetEricTestSimulationRequest(server string, tenantId Tenant, productId Product, ...) (*http.Request, error)
- type Client
- func (c *Client) CreateEricTestSimulation(ctx context.Context, tenantId Tenant, productId Product, ...) (*http.Response, error)
- func (c *Client) CreateEricTestSimulationWithBody(ctx context.Context, tenantId Tenant, productId Product, ...) (*http.Response, error)
- func (c *Client) GetEricTestSimulation(ctx context.Context, tenantId Tenant, productId Product, ...) (*http.Response, error)
- type ClientInterface
- type ClientOption
- type ClientWithResponses
- func (c *ClientWithResponses) CreateEricTestSimulationWithBodyWithResponse(ctx context.Context, tenantId Tenant, productId Product, ...) (*CreateEricTestSimulationResponse, error)
- func (c *ClientWithResponses) CreateEricTestSimulationWithResponse(ctx context.Context, tenantId Tenant, productId Product, ...) (*CreateEricTestSimulationResponse, error)
- func (c *ClientWithResponses) GetEricTestSimulationWithResponse(ctx context.Context, tenantId Tenant, productId Product, ...) (*GetEricTestSimulationResponse, error)
- type ClientWithResponsesInterface
- type CreateEricTestSimulationJSONBody
- type CreateEricTestSimulationJSONRequestBody
- type CreateEricTestSimulationParams
- type CreateEricTestSimulationResponse
- func (r CreateEricTestSimulationResponse) ContentType() string
- func (r CreateEricTestSimulationResponse) GetApplicationproblemJSONDefault() *Problem
- func (r CreateEricTestSimulationResponse) GetBody() []byte
- func (r CreateEricTestSimulationResponse) GetJSON202() *Simulation
- func (r CreateEricTestSimulationResponse) Status() string
- func (r CreateEricTestSimulationResponse) StatusCode() int
- type GetEricTestSimulationParams
- type GetEricTestSimulationResponse
- func (r GetEricTestSimulationResponse) ContentType() string
- func (r GetEricTestSimulationResponse) GetApplicationproblemJSONDefault() *Problem
- func (r GetEricTestSimulationResponse) GetBody() []byte
- func (r GetEricTestSimulationResponse) GetJSON200() *Simulation
- func (r GetEricTestSimulationResponse) Status() string
- func (r GetEricTestSimulationResponse) StatusCode() int
- type HttpRequestDoer
- type Idempotency
- type Problem
- type Product
- type RequestEditorFn
- type Simulation
- type Tenant
- type TenantHeader
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCreateEricTestSimulationRequest ¶
func NewCreateEricTestSimulationRequest(server string, tenantId Tenant, productId Product, params *CreateEricTestSimulationParams, body CreateEricTestSimulationJSONRequestBody) (*http.Request, error)
NewCreateEricTestSimulationRequest calls the generic CreateEricTestSimulation builder with application/json body
func NewCreateEricTestSimulationRequestWithBody ¶
func NewCreateEricTestSimulationRequestWithBody(server string, tenantId Tenant, productId Product, params *CreateEricTestSimulationParams, contentType string, body io.Reader) (*http.Request, error)
NewCreateEricTestSimulationRequestWithBody constructs an http.Request for the CreateEricTestSimulation method, with any body, and a specified content type
func NewGetEricTestSimulationRequest ¶
func NewGetEricTestSimulationRequest(server string, tenantId Tenant, productId Product, simulationId openapi_types.UUID, params *GetEricTestSimulationParams) (*http.Request, error)
NewGetEricTestSimulationRequest constructs an http.Request for the GetEricTestSimulation method
Types ¶
type Client ¶
type Client struct {
// The endpoint of the server conforming to this interface, with scheme,
// https://api.deepmap.com for example. This can contain a path relative
// to the server, such as https://api.deepmap.com/dev-test, and all the
// paths in the swagger spec will be appended to the server.
Server string
// Doer for performing requests, typically a *http.Client with any
// customized settings, such as certificate chains.
Client HttpRequestDoer
// A list of callbacks for modifying requests which are generated before sending over
// the network.
RequestEditors []RequestEditorFn
}
Client which conforms to the OpenAPI3 specification for this service.
func NewClient ¶
func NewClient(server string, opts ...ClientOption) (*Client, error)
Creates a new Client, with reasonable defaults
func (*Client) CreateEricTestSimulation ¶
func (c *Client) CreateEricTestSimulation(ctx context.Context, tenantId Tenant, productId Product, params *CreateEricTestSimulationParams, body CreateEricTestSimulationJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
CreateEricTestSimulation performs a POST /v1/tenants/{tenantId}/products/{productId}/simulations (the `CreateEricTestSimulation` operationId) request. Takes a body of the `application/json` content type.
func (*Client) CreateEricTestSimulationWithBody ¶
func (c *Client) CreateEricTestSimulationWithBody(ctx context.Context, tenantId Tenant, productId Product, params *CreateEricTestSimulationParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
CreateEricTestSimulationWithBody performs a POST /v1/tenants/{tenantId}/products/{productId}/simulations (the `CreateEricTestSimulation` operationId) request, with any type of body and a specified content type.
func (*Client) GetEricTestSimulation ¶
func (c *Client) GetEricTestSimulation(ctx context.Context, tenantId Tenant, productId Product, simulationId openapi_types.UUID, params *GetEricTestSimulationParams, reqEditors ...RequestEditorFn) (*http.Response, error)
GetEricTestSimulation performs a GET /v1/tenants/{tenantId}/products/{productId}/simulations/{simulationId} (the `GetEricTestSimulation` operationId) request.
type ClientInterface ¶
type ClientInterface interface {
// CreateEricTestSimulationWithBody performs a POST /v1/tenants/{tenantId}/products/{productId}/simulations (the `CreateEricTestSimulation` operationId) request,
// with any type of body and a specified content type.
CreateEricTestSimulationWithBody(ctx context.Context, tenantId Tenant, productId Product, params *CreateEricTestSimulationParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
// CreateEricTestSimulation performs a POST /v1/tenants/{tenantId}/products/{productId}/simulations (the `CreateEricTestSimulation` operationId) request.
// Takes a body of the `application/json` content type.
CreateEricTestSimulation(ctx context.Context, tenantId Tenant, productId Product, params *CreateEricTestSimulationParams, body CreateEricTestSimulationJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetEricTestSimulation performs a GET /v1/tenants/{tenantId}/products/{productId}/simulations/{simulationId} (the `GetEricTestSimulation` operationId) request.
GetEricTestSimulation(ctx context.Context, tenantId Tenant, productId Product, simulationId openapi_types.UUID, params *GetEricTestSimulationParams, reqEditors ...RequestEditorFn) (*http.Response, error)
}
The interface specification for the client above.
type ClientOption ¶
ClientOption allows setting custom parameters during construction
func WithHTTPClient ¶
func WithHTTPClient(doer HttpRequestDoer) ClientOption
WithHTTPClient allows overriding the default Doer, which is automatically created using http.Client. This is useful for tests.
func WithRequestEditorFn ¶
func WithRequestEditorFn(fn RequestEditorFn) ClientOption
WithRequestEditorFn allows setting up a callback function, which will be called right before sending the request. This can be used to mutate the request.
type ClientWithResponses ¶
type ClientWithResponses struct {
ClientInterface
}
ClientWithResponses builds on ClientInterface to offer response payloads
func NewClientWithResponses ¶
func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error)
NewClientWithResponses creates a new ClientWithResponses, which wraps Client with return type handling
func (*ClientWithResponses) CreateEricTestSimulationWithBodyWithResponse ¶
func (c *ClientWithResponses) CreateEricTestSimulationWithBodyWithResponse(ctx context.Context, tenantId Tenant, productId Product, params *CreateEricTestSimulationParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateEricTestSimulationResponse, error)
CreateEricTestSimulationWithBodyWithResponse performs a POST /v1/tenants/{tenantId}/products/{productId}/simulations (the `CreateEricTestSimulation` operationId) request, with any type of body and a specified content type.
Returns a wrapper object for the known response body format(s).
func (*ClientWithResponses) CreateEricTestSimulationWithResponse ¶
func (c *ClientWithResponses) CreateEricTestSimulationWithResponse(ctx context.Context, tenantId Tenant, productId Product, params *CreateEricTestSimulationParams, body CreateEricTestSimulationJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateEricTestSimulationResponse, error)
CreateEricTestSimulationWithResponse performs a POST /v1/tenants/{tenantId}/products/{productId}/simulations (the `CreateEricTestSimulation` operationId) request. Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
func (*ClientWithResponses) GetEricTestSimulationWithResponse ¶
func (c *ClientWithResponses) GetEricTestSimulationWithResponse(ctx context.Context, tenantId Tenant, productId Product, simulationId openapi_types.UUID, params *GetEricTestSimulationParams, reqEditors ...RequestEditorFn) (*GetEricTestSimulationResponse, error)
GetEricTestSimulationWithResponse performs a GET /v1/tenants/{tenantId}/products/{productId}/simulations/{simulationId} (the `GetEricTestSimulation` operationId) request.
Returns a wrapper object for the known response body format(s).
type ClientWithResponsesInterface ¶
type ClientWithResponsesInterface interface {
// CreateEricTestSimulationWithBodyWithResponse performs a POST /v1/tenants/{tenantId}/products/{productId}/simulations (the `CreateEricTestSimulation` operationId) request,
// with any type of body and a specified content type.
//
// Returns a wrapper object for the known response body format(s).
CreateEricTestSimulationWithBodyWithResponse(ctx context.Context, tenantId Tenant, productId Product, params *CreateEricTestSimulationParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateEricTestSimulationResponse, error)
// CreateEricTestSimulationWithResponse performs a POST /v1/tenants/{tenantId}/products/{productId}/simulations (the `CreateEricTestSimulation` operationId) request.
// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
CreateEricTestSimulationWithResponse(ctx context.Context, tenantId Tenant, productId Product, params *CreateEricTestSimulationParams, body CreateEricTestSimulationJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateEricTestSimulationResponse, error)
// GetEricTestSimulationWithResponse performs a GET /v1/tenants/{tenantId}/products/{productId}/simulations/{simulationId} (the `GetEricTestSimulation` operationId) request.
//
// Returns a wrapper object for the known response body format(s).
GetEricTestSimulationWithResponse(ctx context.Context, tenantId Tenant, productId Product, simulationId openapi_types.UUID, params *GetEricTestSimulationParams, reqEditors ...RequestEditorFn) (*GetEricTestSimulationResponse, error)
}
ClientWithResponsesInterface is the interface specification for the client with responses above.
type CreateEricTestSimulationJSONBody ¶
type CreateEricTestSimulationJSONBody struct {
Fixture interface{} `json:"fixture"`
}
CreateEricTestSimulationJSONBody defines parameters for CreateEricTestSimulation.
type CreateEricTestSimulationJSONRequestBody ¶
type CreateEricTestSimulationJSONRequestBody CreateEricTestSimulationJSONBody
CreateEricTestSimulationJSONRequestBody defines body for CreateEricTestSimulation for application/json ContentType.
type CreateEricTestSimulationParams ¶
type CreateEricTestSimulationParams struct {
IdempotencyKey Idempotency `json:"Idempotency-Key"`
XERICTenant TenantHeader `json:"X-ERIC-Tenant"`
}
CreateEricTestSimulationParams defines parameters for CreateEricTestSimulation.
type CreateEricTestSimulationResponse ¶
type CreateEricTestSimulationResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON202 the response for an HTTP 202 `application/json` response
JSON202 *Simulation
// ApplicationproblemJSONDefault the response for an HTTP default `application/problem+json` response
ApplicationproblemJSONDefault *Problem
}
func ParseCreateEricTestSimulationResponse ¶
func ParseCreateEricTestSimulationResponse(rsp *http.Response) (*CreateEricTestSimulationResponse, error)
ParseCreateEricTestSimulationResponse parses an HTTP response from a CreateEricTestSimulationWithResponse call
func (CreateEricTestSimulationResponse) ContentType ¶
func (r CreateEricTestSimulationResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (CreateEricTestSimulationResponse) GetApplicationproblemJSONDefault ¶
func (r CreateEricTestSimulationResponse) GetApplicationproblemJSONDefault() *Problem
GetApplicationproblemJSONDefault returns the response for an HTTP default `application/problem+json` response
func (CreateEricTestSimulationResponse) GetBody ¶
func (r CreateEricTestSimulationResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (CreateEricTestSimulationResponse) GetJSON202 ¶
func (r CreateEricTestSimulationResponse) GetJSON202() *Simulation
GetJSON202 returns the response for an HTTP 202 `application/json` response
func (CreateEricTestSimulationResponse) Status ¶
func (r CreateEricTestSimulationResponse) Status() string
Status returns HTTPResponse.Status
func (CreateEricTestSimulationResponse) StatusCode ¶
func (r CreateEricTestSimulationResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetEricTestSimulationParams ¶
type GetEricTestSimulationParams struct {
XERICTenant TenantHeader `json:"X-ERIC-Tenant"`
}
GetEricTestSimulationParams defines parameters for GetEricTestSimulation.
type GetEricTestSimulationResponse ¶
type GetEricTestSimulationResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *Simulation
// ApplicationproblemJSONDefault the response for an HTTP default `application/problem+json` response
ApplicationproblemJSONDefault *Problem
}
func ParseGetEricTestSimulationResponse ¶
func ParseGetEricTestSimulationResponse(rsp *http.Response) (*GetEricTestSimulationResponse, error)
ParseGetEricTestSimulationResponse parses an HTTP response from a GetEricTestSimulationWithResponse call
func (GetEricTestSimulationResponse) ContentType ¶
func (r GetEricTestSimulationResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (GetEricTestSimulationResponse) GetApplicationproblemJSONDefault ¶
func (r GetEricTestSimulationResponse) GetApplicationproblemJSONDefault() *Problem
GetApplicationproblemJSONDefault returns the response for an HTTP default `application/problem+json` response
func (GetEricTestSimulationResponse) GetBody ¶
func (r GetEricTestSimulationResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (GetEricTestSimulationResponse) GetJSON200 ¶
func (r GetEricTestSimulationResponse) GetJSON200() *Simulation
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (GetEricTestSimulationResponse) Status ¶
func (r GetEricTestSimulationResponse) Status() string
Status returns HTTPResponse.Status
func (GetEricTestSimulationResponse) StatusCode ¶
func (r GetEricTestSimulationResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type HttpRequestDoer ¶
Doer performs HTTP requests.
The standard http.Client implements this interface.
type RequestEditorFn ¶
RequestEditorFn is the function signature for the RequestEditor callback function
type Simulation ¶
type Simulation struct {
Fixture interface{} `json:"fixture"`
Id openapi_types.UUID `json:"id"`
Outcome interface{} `json:"outcome"`
Simulated interface{} `json:"simulated"`
Status interface{} `json:"status"`
}
Simulation defines model for simulation.
type TenantHeader ¶
type TenantHeader = openapi_types.UUID
TenantHeader defines model for tenantHeader.