Documentation
¶
Overview ¶
Package provider provides primitives to interact with the openapi HTTP API.
Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.7.0 DO NOT EDIT.
Index ¶
- func NewApplyProviderRequest(server string, providerId ProviderIdPath, body ApplyProviderJSONRequestBody) (*http.Request, error)
- func NewApplyProviderRequestWithBody(server string, providerId ProviderIdPath, contentType string, body io.Reader) (*http.Request, error)
- func NewCreateProviderRequest(server string, params *CreateProviderParams, ...) (*http.Request, error)
- func NewCreateProviderRequestWithBody(server string, params *CreateProviderParams, contentType string, ...) (*http.Request, error)
- func NewDeleteProviderRequest(server string, providerId ProviderIdPath) (*http.Request, error)
- func NewGetProviderRequest(server string, providerId ProviderIdPath) (*http.Request, error)
- func NewListProvidersRequest(server string, params *ListProvidersParams) (*http.Request, error)
- type ApplyProviderResponse
- type Client
- func (c *Client) ApplyProvider(ctx context.Context, providerId ProviderIdPath, ...) (*http.Response, error)
- func (c *Client) ApplyProviderWithBody(ctx context.Context, providerId ProviderIdPath, contentType string, ...) (*http.Response, error)
- func (c *Client) CreateProvider(ctx context.Context, params *CreateProviderParams, ...) (*http.Response, error)
- func (c *Client) CreateProviderWithBody(ctx context.Context, params *CreateProviderParams, contentType string, ...) (*http.Response, error)
- func (c *Client) DeleteProvider(ctx context.Context, providerId ProviderIdPath, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetProvider(ctx context.Context, providerId ProviderIdPath, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) ListProviders(ctx context.Context, params *ListProvidersParams, ...) (*http.Response, error)
- type ClientInterface
- type ClientOption
- type ClientWithResponses
- func (c *ClientWithResponses) ApplyProviderWithBodyWithResponse(ctx context.Context, providerId ProviderIdPath, contentType string, ...) (*ApplyProviderResponse, error)
- func (c *ClientWithResponses) ApplyProviderWithResponse(ctx context.Context, providerId ProviderIdPath, ...) (*ApplyProviderResponse, error)
- func (c *ClientWithResponses) CreateProviderWithBodyWithResponse(ctx context.Context, params *CreateProviderParams, contentType string, ...) (*CreateProviderResponse, error)
- func (c *ClientWithResponses) CreateProviderWithResponse(ctx context.Context, params *CreateProviderParams, ...) (*CreateProviderResponse, error)
- func (c *ClientWithResponses) DeleteProviderWithResponse(ctx context.Context, providerId ProviderIdPath, reqEditors ...RequestEditorFn) (*DeleteProviderResponse, error)
- func (c *ClientWithResponses) GetProviderWithResponse(ctx context.Context, providerId ProviderIdPath, reqEditors ...RequestEditorFn) (*GetProviderResponse, error)
- func (c *ClientWithResponses) ListProvidersWithResponse(ctx context.Context, params *ListProvidersParams, ...) (*ListProvidersResponse, error)
- type ClientWithResponsesInterface
- type CreateProviderResponse
- type DeleteProviderResponse
- type GetProviderResponse
- type HttpRequestDoer
- type ListProvidersResponse
- type RequestEditorFn
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewApplyProviderRequest ¶
func NewApplyProviderRequest(server string, providerId ProviderIdPath, body ApplyProviderJSONRequestBody) (*http.Request, error)
NewApplyProviderRequest calls the generic ApplyProvider builder with application/json body
func NewApplyProviderRequestWithBody ¶
func NewApplyProviderRequestWithBody(server string, providerId ProviderIdPath, contentType string, body io.Reader) (*http.Request, error)
NewApplyProviderRequestWithBody generates requests for ApplyProvider with any type of body
func NewCreateProviderRequest ¶
func NewCreateProviderRequest(server string, params *CreateProviderParams, body CreateProviderJSONRequestBody) (*http.Request, error)
NewCreateProviderRequest calls the generic CreateProvider builder with application/json body
func NewCreateProviderRequestWithBody ¶
func NewCreateProviderRequestWithBody(server string, params *CreateProviderParams, contentType string, body io.Reader) (*http.Request, error)
NewCreateProviderRequestWithBody generates requests for CreateProvider with any type of body
func NewDeleteProviderRequest ¶
NewDeleteProviderRequest generates requests for DeleteProvider
func NewGetProviderRequest ¶
NewGetProviderRequest generates requests for GetProvider
Types ¶
type ApplyProviderResponse ¶
type ApplyProviderResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *Provider
ApplicationproblemJSON400 *Error
ApplicationproblemJSON404 *Error
ApplicationproblemJSON409 *Error
ApplicationproblemJSONDefault *Error
}
func ParseApplyProviderResponse ¶
func ParseApplyProviderResponse(rsp *http.Response) (*ApplyProviderResponse, error)
ParseApplyProviderResponse parses an HTTP response from a ApplyProviderWithResponse call
func (ApplyProviderResponse) ContentType ¶
func (r ApplyProviderResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (ApplyProviderResponse) Status ¶
func (r ApplyProviderResponse) Status() string
Status returns HTTPResponse.Status
func (ApplyProviderResponse) StatusCode ¶
func (r ApplyProviderResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
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) ApplyProvider ¶
func (*Client) ApplyProviderWithBody ¶
func (*Client) CreateProvider ¶
func (*Client) CreateProviderWithBody ¶
func (*Client) DeleteProvider ¶
func (*Client) GetProvider ¶
func (*Client) ListProviders ¶
type ClientInterface ¶
type ClientInterface interface {
// ListProviders request
ListProviders(ctx context.Context, params *ListProvidersParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// CreateProviderWithBody request with any body
CreateProviderWithBody(ctx context.Context, params *CreateProviderParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
CreateProvider(ctx context.Context, params *CreateProviderParams, body CreateProviderJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// DeleteProvider request
DeleteProvider(ctx context.Context, providerId ProviderIdPath, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetProvider request
GetProvider(ctx context.Context, providerId ProviderIdPath, reqEditors ...RequestEditorFn) (*http.Response, error)
// ApplyProviderWithBody request with any body
ApplyProviderWithBody(ctx context.Context, providerId ProviderIdPath, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
ApplyProvider(ctx context.Context, providerId ProviderIdPath, body ApplyProviderJSONRequestBody, 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) ApplyProviderWithBodyWithResponse ¶
func (c *ClientWithResponses) ApplyProviderWithBodyWithResponse(ctx context.Context, providerId ProviderIdPath, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ApplyProviderResponse, error)
ApplyProviderWithBodyWithResponse request with arbitrary body returning *ApplyProviderResponse
func (*ClientWithResponses) ApplyProviderWithResponse ¶
func (c *ClientWithResponses) ApplyProviderWithResponse(ctx context.Context, providerId ProviderIdPath, body ApplyProviderJSONRequestBody, reqEditors ...RequestEditorFn) (*ApplyProviderResponse, error)
func (*ClientWithResponses) CreateProviderWithBodyWithResponse ¶
func (c *ClientWithResponses) CreateProviderWithBodyWithResponse(ctx context.Context, params *CreateProviderParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateProviderResponse, error)
CreateProviderWithBodyWithResponse request with arbitrary body returning *CreateProviderResponse
func (*ClientWithResponses) CreateProviderWithResponse ¶
func (c *ClientWithResponses) CreateProviderWithResponse(ctx context.Context, params *CreateProviderParams, body CreateProviderJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateProviderResponse, error)
func (*ClientWithResponses) DeleteProviderWithResponse ¶
func (c *ClientWithResponses) DeleteProviderWithResponse(ctx context.Context, providerId ProviderIdPath, reqEditors ...RequestEditorFn) (*DeleteProviderResponse, error)
DeleteProviderWithResponse request returning *DeleteProviderResponse
func (*ClientWithResponses) GetProviderWithResponse ¶
func (c *ClientWithResponses) GetProviderWithResponse(ctx context.Context, providerId ProviderIdPath, reqEditors ...RequestEditorFn) (*GetProviderResponse, error)
GetProviderWithResponse request returning *GetProviderResponse
func (*ClientWithResponses) ListProvidersWithResponse ¶
func (c *ClientWithResponses) ListProvidersWithResponse(ctx context.Context, params *ListProvidersParams, reqEditors ...RequestEditorFn) (*ListProvidersResponse, error)
ListProvidersWithResponse request returning *ListProvidersResponse
type ClientWithResponsesInterface ¶
type ClientWithResponsesInterface interface {
// ListProvidersWithResponse request
ListProvidersWithResponse(ctx context.Context, params *ListProvidersParams, reqEditors ...RequestEditorFn) (*ListProvidersResponse, error)
// CreateProviderWithBodyWithResponse request with any body
CreateProviderWithBodyWithResponse(ctx context.Context, params *CreateProviderParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateProviderResponse, error)
CreateProviderWithResponse(ctx context.Context, params *CreateProviderParams, body CreateProviderJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateProviderResponse, error)
// DeleteProviderWithResponse request
DeleteProviderWithResponse(ctx context.Context, providerId ProviderIdPath, reqEditors ...RequestEditorFn) (*DeleteProviderResponse, error)
// GetProviderWithResponse request
GetProviderWithResponse(ctx context.Context, providerId ProviderIdPath, reqEditors ...RequestEditorFn) (*GetProviderResponse, error)
// ApplyProviderWithBodyWithResponse request with any body
ApplyProviderWithBodyWithResponse(ctx context.Context, providerId ProviderIdPath, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ApplyProviderResponse, error)
ApplyProviderWithResponse(ctx context.Context, providerId ProviderIdPath, body ApplyProviderJSONRequestBody, reqEditors ...RequestEditorFn) (*ApplyProviderResponse, error)
}
ClientWithResponsesInterface is the interface specification for the client with responses above.
type CreateProviderResponse ¶
type CreateProviderResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *Provider
JSON201 *Provider
ApplicationproblemJSON400 *Error
ApplicationproblemJSON409 *Error
ApplicationproblemJSON422 *Error
ApplicationproblemJSONDefault *Error
}
func ParseCreateProviderResponse ¶
func ParseCreateProviderResponse(rsp *http.Response) (*CreateProviderResponse, error)
ParseCreateProviderResponse parses an HTTP response from a CreateProviderWithResponse call
func (CreateProviderResponse) ContentType ¶
func (r CreateProviderResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (CreateProviderResponse) Status ¶
func (r CreateProviderResponse) Status() string
Status returns HTTPResponse.Status
func (CreateProviderResponse) StatusCode ¶
func (r CreateProviderResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type DeleteProviderResponse ¶
type DeleteProviderResponse struct {
Body []byte
HTTPResponse *http.Response
ApplicationproblemJSON400 *Error
ApplicationproblemJSON404 *Error
ApplicationproblemJSONDefault *Error
}
func ParseDeleteProviderResponse ¶
func ParseDeleteProviderResponse(rsp *http.Response) (*DeleteProviderResponse, error)
ParseDeleteProviderResponse parses an HTTP response from a DeleteProviderWithResponse call
func (DeleteProviderResponse) ContentType ¶
func (r DeleteProviderResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (DeleteProviderResponse) Status ¶
func (r DeleteProviderResponse) Status() string
Status returns HTTPResponse.Status
func (DeleteProviderResponse) StatusCode ¶
func (r DeleteProviderResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetProviderResponse ¶
type GetProviderResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *Provider
ApplicationproblemJSON400 *Error
ApplicationproblemJSON404 *Error
ApplicationproblemJSONDefault *Error
}
func ParseGetProviderResponse ¶
func ParseGetProviderResponse(rsp *http.Response) (*GetProviderResponse, error)
ParseGetProviderResponse parses an HTTP response from a GetProviderWithResponse call
func (GetProviderResponse) ContentType ¶
func (r GetProviderResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (GetProviderResponse) Status ¶
func (r GetProviderResponse) Status() string
Status returns HTTPResponse.Status
func (GetProviderResponse) StatusCode ¶
func (r GetProviderResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type HttpRequestDoer ¶
Doer performs HTTP requests.
The standard http.Client implements this interface.
type ListProvidersResponse ¶
type ListProvidersResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *ProviderList
ApplicationproblemJSON400 *Error
ApplicationproblemJSONDefault *Error
}
func ParseListProvidersResponse ¶
func ParseListProvidersResponse(rsp *http.Response) (*ListProvidersResponse, error)
ParseListProvidersResponse parses an HTTP response from a ListProvidersWithResponse call
func (ListProvidersResponse) ContentType ¶
func (r ListProvidersResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (ListProvidersResponse) Status ¶
func (r ListProvidersResponse) Status() string
Status returns HTTPResponse.Status
func (ListProvidersResponse) StatusCode ¶
func (r ListProvidersResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode