Documentation
¶
Overview ¶
Package client provides primitives to interact with the openapi HTTP API.
Code generated by github.com/deepmap/oapi-codegen/v2 version v2.0.0 DO NOT EDIT.
Index ¶
- func NewDownloadPatchArchiveFileRequest(server string, patchID string, artifactName string) (*http.Request, error)
- func NewDownloadPatchArchiveRequest(server string, patchID string) (*http.Request, error)
- func NewGetAvailablePatchEnvelopesRequest(server string) (*http.Request, error)
- func NewPostOpaqueStatusRequest(server string, body PostOpaqueStatusJSONRequestBody) (*http.Request, error)
- func NewPostOpaqueStatusRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- type BinaryBlob
- type Client
- func (c *Client) DownloadPatchArchive(ctx context.Context, patchID string, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) DownloadPatchArchiveFile(ctx context.Context, patchID string, artifactName string, ...) (*http.Response, error)
- func (c *Client) GetAvailablePatchEnvelopes(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) PostOpaqueStatus(ctx context.Context, body PostOpaqueStatusJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) PostOpaqueStatusWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- type ClientInterface
- type ClientOption
- type ClientWithResponses
- func (c *ClientWithResponses) DownloadPatchArchiveFileWithResponse(ctx context.Context, patchID string, artifactName string, ...) (*DownloadPatchArchiveFileResponse, error)
- func (c *ClientWithResponses) DownloadPatchArchiveWithResponse(ctx context.Context, patchID string, reqEditors ...RequestEditorFn) (*DownloadPatchArchiveResponse, error)
- func (c *ClientWithResponses) GetAvailablePatchEnvelopesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetAvailablePatchEnvelopesResponse, error)
- func (c *ClientWithResponses) PostOpaqueStatusWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*PostOpaqueStatusResponse, error)
- func (c *ClientWithResponses) PostOpaqueStatusWithResponse(ctx context.Context, body PostOpaqueStatusJSONRequestBody, ...) (*PostOpaqueStatusResponse, error)
- type ClientWithResponsesInterface
- type DownloadPatchArchiveFileResponse
- type DownloadPatchArchiveResponse
- type GetAvailablePatchEnvelopesResponse
- type HttpRequestDoer
- type OpaqueStatus
- type PatchEnvelopeDescription
- type PostOpaqueStatusJSONRequestBody
- type PostOpaqueStatusResponse
- type RequestEditorFn
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewDownloadPatchArchiveFileRequest ¶
func NewDownloadPatchArchiveFileRequest(server string, patchID string, artifactName string) (*http.Request, error)
NewDownloadPatchArchiveFileRequest generates requests for DownloadPatchArchiveFile
func NewDownloadPatchArchiveRequest ¶
NewDownloadPatchArchiveRequest generates requests for DownloadPatchArchive
func NewGetAvailablePatchEnvelopesRequest ¶
NewGetAvailablePatchEnvelopesRequest generates requests for GetAvailablePatchEnvelopes
func NewPostOpaqueStatusRequest ¶
func NewPostOpaqueStatusRequest(server string, body PostOpaqueStatusJSONRequestBody) (*http.Request, error)
NewPostOpaqueStatusRequest calls the generic PostOpaqueStatus builder with application/json body
Types ¶
type BinaryBlob ¶
type BinaryBlob struct {
// ArtifactMetaData base64-encoded generic metadata, i.e. user info, description, etc.
ArtifactMetaData *string `json:"artifactMetaData,omitempty"`
// FileMetaData base64-encoded metadata related to file, i.e. env variables, cli arguments
FileMetaData *string `json:"fileMetaData,omitempty"`
// FileName Name of binary artifact
FileName *string `json:"fileName,omitempty"`
// FileSha SHA-256 of the binary artifact
FileSha *string `json:"fileSha,omitempty"`
// Size size of binary artifact in bytes
Size *int `json:"size,omitempty"`
// Url URL to download this binary artifact
Url *string `json:"url,omitempty"`
}
BinaryBlob Binary blobs (or artifacts) are the files exposed to app instance through patch envelope. They are treated as files, each entry contains artifact name, it's SHA and size, metadata related to file, user info. Also it has URL to download this file.
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) DownloadPatchArchive ¶
func (*Client) DownloadPatchArchiveFile ¶
func (*Client) GetAvailablePatchEnvelopes ¶
func (*Client) PostOpaqueStatus ¶
func (c *Client) PostOpaqueStatus(ctx context.Context, body PostOpaqueStatusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
type ClientInterface ¶
type ClientInterface interface {
// PostOpaqueStatusWithBody request with any body
PostOpaqueStatusWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
PostOpaqueStatus(ctx context.Context, body PostOpaqueStatusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetAvailablePatchEnvelopes request
GetAvailablePatchEnvelopes(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
// DownloadPatchArchive request
DownloadPatchArchive(ctx context.Context, patchID string, reqEditors ...RequestEditorFn) (*http.Response, error)
// DownloadPatchArchiveFile request
DownloadPatchArchiveFile(ctx context.Context, patchID string, artifactName string, 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) DownloadPatchArchiveFileWithResponse ¶
func (c *ClientWithResponses) DownloadPatchArchiveFileWithResponse(ctx context.Context, patchID string, artifactName string, reqEditors ...RequestEditorFn) (*DownloadPatchArchiveFileResponse, error)
DownloadPatchArchiveFileWithResponse request returning *DownloadPatchArchiveFileResponse
func (*ClientWithResponses) DownloadPatchArchiveWithResponse ¶
func (c *ClientWithResponses) DownloadPatchArchiveWithResponse(ctx context.Context, patchID string, reqEditors ...RequestEditorFn) (*DownloadPatchArchiveResponse, error)
DownloadPatchArchiveWithResponse request returning *DownloadPatchArchiveResponse
func (*ClientWithResponses) GetAvailablePatchEnvelopesWithResponse ¶
func (c *ClientWithResponses) GetAvailablePatchEnvelopesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetAvailablePatchEnvelopesResponse, error)
GetAvailablePatchEnvelopesWithResponse request returning *GetAvailablePatchEnvelopesResponse
func (*ClientWithResponses) PostOpaqueStatusWithBodyWithResponse ¶
func (c *ClientWithResponses) PostOpaqueStatusWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostOpaqueStatusResponse, error)
PostOpaqueStatusWithBodyWithResponse request with arbitrary body returning *PostOpaqueStatusResponse
func (*ClientWithResponses) PostOpaqueStatusWithResponse ¶
func (c *ClientWithResponses) PostOpaqueStatusWithResponse(ctx context.Context, body PostOpaqueStatusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostOpaqueStatusResponse, error)
type ClientWithResponsesInterface ¶
type ClientWithResponsesInterface interface {
// PostOpaqueStatusWithBodyWithResponse request with any body
PostOpaqueStatusWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostOpaqueStatusResponse, error)
PostOpaqueStatusWithResponse(ctx context.Context, body PostOpaqueStatusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostOpaqueStatusResponse, error)
// GetAvailablePatchEnvelopesWithResponse request
GetAvailablePatchEnvelopesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetAvailablePatchEnvelopesResponse, error)
// DownloadPatchArchiveWithResponse request
DownloadPatchArchiveWithResponse(ctx context.Context, patchID string, reqEditors ...RequestEditorFn) (*DownloadPatchArchiveResponse, error)
// DownloadPatchArchiveFileWithResponse request
DownloadPatchArchiveFileWithResponse(ctx context.Context, patchID string, artifactName string, reqEditors ...RequestEditorFn) (*DownloadPatchArchiveFileResponse, error)
}
ClientWithResponsesInterface is the interface specification for the client with responses above.
type DownloadPatchArchiveFileResponse ¶
func ParseDownloadPatchArchiveFileResponse ¶
func ParseDownloadPatchArchiveFileResponse(rsp *http.Response) (*DownloadPatchArchiveFileResponse, error)
ParseDownloadPatchArchiveFileResponse parses an HTTP response from a DownloadPatchArchiveFileWithResponse call
func (DownloadPatchArchiveFileResponse) Status ¶
func (r DownloadPatchArchiveFileResponse) Status() string
Status returns HTTPResponse.Status
func (DownloadPatchArchiveFileResponse) StatusCode ¶
func (r DownloadPatchArchiveFileResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type DownloadPatchArchiveResponse ¶
func ParseDownloadPatchArchiveResponse ¶
func ParseDownloadPatchArchiveResponse(rsp *http.Response) (*DownloadPatchArchiveResponse, error)
ParseDownloadPatchArchiveResponse parses an HTTP response from a DownloadPatchArchiveWithResponse call
func (DownloadPatchArchiveResponse) Status ¶
func (r DownloadPatchArchiveResponse) Status() string
Status returns HTTPResponse.Status
func (DownloadPatchArchiveResponse) StatusCode ¶
func (r DownloadPatchArchiveResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetAvailablePatchEnvelopesResponse ¶
type GetAvailablePatchEnvelopesResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *[]PatchEnvelopeDescription
}
func ParseGetAvailablePatchEnvelopesResponse ¶
func ParseGetAvailablePatchEnvelopesResponse(rsp *http.Response) (*GetAvailablePatchEnvelopesResponse, error)
ParseGetAvailablePatchEnvelopesResponse parses an HTTP response from a GetAvailablePatchEnvelopesWithResponse call
func (GetAvailablePatchEnvelopesResponse) Status ¶
func (r GetAvailablePatchEnvelopesResponse) Status() string
Status returns HTTPResponse.Status
func (GetAvailablePatchEnvelopesResponse) StatusCode ¶
func (r GetAvailablePatchEnvelopesResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type HttpRequestDoer ¶
Doer performs HTTP requests.
The standard http.Client implements this interface.
type OpaqueStatus ¶
type OpaqueStatus struct {
Status *[]byte `json:"status,omitempty"`
}
OpaqueStatus Opaque status to send back to controller
type PatchEnvelopeDescription ¶
type PatchEnvelopeDescription struct {
BinaryBlobs *[]BinaryBlob `json:"BinaryBlobs,omitempty"`
// PatchID Unique identifier of patch envelope
PatchID *string `json:"PatchID,omitempty"`
// Version Version of patch envelope
Version *string `json:"Version,omitempty"`
}
PatchEnvelopeDescription Patch envelope contains of artifacts (binary blobs) which could be anything you want (configuration files, binary executables, dynamic libraries, etc.)
type PostOpaqueStatusJSONRequestBody ¶
type PostOpaqueStatusJSONRequestBody = OpaqueStatus
PostOpaqueStatusJSONRequestBody defines body for PostOpaqueStatus for application/json ContentType.
type PostOpaqueStatusResponse ¶
func ParsePostOpaqueStatusResponse ¶
func ParsePostOpaqueStatusResponse(rsp *http.Response) (*PostOpaqueStatusResponse, error)
ParsePostOpaqueStatusResponse parses an HTTP response from a PostOpaqueStatusWithResponse call
func (PostOpaqueStatusResponse) Status ¶
func (r PostOpaqueStatusResponse) Status() string
Status returns HTTPResponse.Status
func (PostOpaqueStatusResponse) StatusCode ¶
func (r PostOpaqueStatusResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode