Documentation ¶
Overview ¶
Package promises is a generated GoMock package.
Package promises 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 NewCreatePromiseRequest(server string, params *CreatePromiseParams, body CreatePromiseJSONRequestBody) (*http.Request, error)
- func NewCreatePromiseRequestWithBody(server string, params *CreatePromiseParams, contentType string, body io.Reader) (*http.Request, error)
- func NewGetPromiseRequest(server string, id IdPath, params *GetPromiseParams) (*http.Request, error)
- func NewPatchPromisesIdRequest(server string, id IdPath, params *PatchPromisesIdParams, ...) (*http.Request, error)
- func NewPatchPromisesIdRequestWithBody(server string, id IdPath, params *PatchPromisesIdParams, contentType string, ...) (*http.Request, error)
- func NewSearchPromisesRequest(server string, params *SearchPromisesParams) (*http.Request, error)
- type Client
- func (c *Client) CreatePromise(ctx context.Context, params *CreatePromiseParams, ...) (*http.Response, error)
- func (c *Client) CreatePromiseWithBody(ctx context.Context, params *CreatePromiseParams, contentType string, ...) (*http.Response, error)
- func (c *Client) GetPromise(ctx context.Context, id IdPath, params *GetPromiseParams, ...) (*http.Response, error)
- func (c *Client) PatchPromisesId(ctx context.Context, id IdPath, params *PatchPromisesIdParams, ...) (*http.Response, error)
- func (c *Client) PatchPromisesIdWithBody(ctx context.Context, id IdPath, params *PatchPromisesIdParams, ...) (*http.Response, error)
- func (c *Client) SearchPromises(ctx context.Context, params *SearchPromisesParams, ...) (*http.Response, error)
- type ClientInterface
- type ClientOption
- type ClientWithResponses
- func (c *ClientWithResponses) CreatePromiseWithBodyWithResponse(ctx context.Context, params *CreatePromiseParams, contentType string, ...) (*CreatePromiseResponse, error)
- func (c *ClientWithResponses) CreatePromiseWithResponse(ctx context.Context, params *CreatePromiseParams, ...) (*CreatePromiseResponse, error)
- func (c *ClientWithResponses) GetPromiseWithResponse(ctx context.Context, id IdPath, params *GetPromiseParams, ...) (*GetPromiseResponse, error)
- func (c *ClientWithResponses) PatchPromisesIdWithBodyWithResponse(ctx context.Context, id IdPath, params *PatchPromisesIdParams, ...) (*PatchPromisesIdResponse, error)
- func (c *ClientWithResponses) PatchPromisesIdWithResponse(ctx context.Context, id IdPath, params *PatchPromisesIdParams, ...) (*PatchPromisesIdResponse, error)
- func (c *ClientWithResponses) SearchPromisesWithResponse(ctx context.Context, params *SearchPromisesParams, ...) (*SearchPromisesResponse, error)
- type ClientWithResponsesInterface
- type CompletePromiseReq
- type CreatePromiseJSONRequestBody
- type CreatePromiseParams
- type CreatePromiseReq
- type CreatePromiseResponse
- type GetPromiseParams
- type GetPromiseResponse
- type HttpRequestDoer
- type IdPath
- type IdempotencyKeyHeader
- type MockClientInterface
- func (m *MockClientInterface) CreatePromise(ctx context.Context, params *CreatePromiseParams, ...) (*http.Response, error)
- func (m *MockClientInterface) CreatePromiseWithBody(ctx context.Context, params *CreatePromiseParams, contentType string, ...) (*http.Response, error)
- func (m *MockClientInterface) EXPECT() *MockClientInterfaceMockRecorder
- func (m *MockClientInterface) GetPromise(ctx context.Context, id IdPath, params *GetPromiseParams, ...) (*http.Response, error)
- func (m *MockClientInterface) PatchPromisesId(ctx context.Context, id IdPath, params *PatchPromisesIdParams, ...) (*http.Response, error)
- func (m *MockClientInterface) PatchPromisesIdWithBody(ctx context.Context, id IdPath, params *PatchPromisesIdParams, ...) (*http.Response, error)
- func (m *MockClientInterface) SearchPromises(ctx context.Context, params *SearchPromisesParams, ...) (*http.Response, error)
- type MockClientInterfaceMockRecorder
- func (mr *MockClientInterfaceMockRecorder) CreatePromise(ctx, params, body interface{}, reqEditors ...interface{}) *gomock.Call
- func (mr *MockClientInterfaceMockRecorder) CreatePromiseWithBody(ctx, params, contentType, body interface{}, reqEditors ...interface{}) *gomock.Call
- func (mr *MockClientInterfaceMockRecorder) GetPromise(ctx, id, params interface{}, reqEditors ...interface{}) *gomock.Call
- func (mr *MockClientInterfaceMockRecorder) PatchPromisesId(ctx, id, params, body interface{}, reqEditors ...interface{}) *gomock.Call
- func (mr *MockClientInterfaceMockRecorder) PatchPromisesIdWithBody(ctx, id, params, contentType, body interface{}, reqEditors ...interface{}) *gomock.Call
- func (mr *MockClientInterfaceMockRecorder) SearchPromises(ctx, params interface{}, reqEditors ...interface{}) *gomock.Call
- type MockClientWithResponsesInterface
- func (m *MockClientWithResponsesInterface) CreatePromiseWithBodyWithResponse(ctx context.Context, params *CreatePromiseParams, contentType string, ...) (*CreatePromiseResponse, error)
- func (m *MockClientWithResponsesInterface) CreatePromiseWithResponse(ctx context.Context, params *CreatePromiseParams, ...) (*CreatePromiseResponse, error)
- func (m *MockClientWithResponsesInterface) EXPECT() *MockClientWithResponsesInterfaceMockRecorder
- func (m *MockClientWithResponsesInterface) GetPromiseWithResponse(ctx context.Context, id IdPath, params *GetPromiseParams, ...) (*GetPromiseResponse, error)
- func (m *MockClientWithResponsesInterface) PatchPromisesIdWithBodyWithResponse(ctx context.Context, id IdPath, params *PatchPromisesIdParams, ...) (*PatchPromisesIdResponse, error)
- func (m *MockClientWithResponsesInterface) PatchPromisesIdWithResponse(ctx context.Context, id IdPath, params *PatchPromisesIdParams, ...) (*PatchPromisesIdResponse, error)
- func (m *MockClientWithResponsesInterface) SearchPromisesWithResponse(ctx context.Context, params *SearchPromisesParams, ...) (*SearchPromisesResponse, error)
- type MockClientWithResponsesInterfaceMockRecorder
- func (mr *MockClientWithResponsesInterfaceMockRecorder) CreatePromiseWithBodyWithResponse(ctx, params, contentType, body interface{}, reqEditors ...interface{}) *gomock.Call
- func (mr *MockClientWithResponsesInterfaceMockRecorder) CreatePromiseWithResponse(ctx, params, body interface{}, reqEditors ...interface{}) *gomock.Call
- func (mr *MockClientWithResponsesInterfaceMockRecorder) GetPromiseWithResponse(ctx, id, params interface{}, reqEditors ...interface{}) *gomock.Call
- func (mr *MockClientWithResponsesInterfaceMockRecorder) PatchPromisesIdWithBodyWithResponse(ctx, id, params, contentType, body interface{}, reqEditors ...interface{}) *gomock.Call
- func (mr *MockClientWithResponsesInterfaceMockRecorder) PatchPromisesIdWithResponse(ctx, id, params, body interface{}, reqEditors ...interface{}) *gomock.Call
- func (mr *MockClientWithResponsesInterfaceMockRecorder) SearchPromisesWithResponse(ctx, params interface{}, reqEditors ...interface{}) *gomock.Call
- type MockHttpRequestDoer
- type MockHttpRequestDoerMockRecorder
- type PatchPromisesIdJSONRequestBody
- type PatchPromisesIdParams
- type PatchPromisesIdResponse
- type Promise
- type PromiseState
- type PromiseStateComplete
- type PromiseValue
- type RequestEditorFn
- type RequestIdHeader
- type SearchPromisesParams
- type SearchPromisesParamsState
- type SearchPromisesResp
- type SearchPromisesResponse
- type StrictHeader
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCreatePromiseRequest ¶
func NewCreatePromiseRequest(server string, params *CreatePromiseParams, body CreatePromiseJSONRequestBody) (*http.Request, error)
NewCreatePromiseRequest calls the generic CreatePromise builder with application/json body
func NewCreatePromiseRequestWithBody ¶
func NewCreatePromiseRequestWithBody(server string, params *CreatePromiseParams, contentType string, body io.Reader) (*http.Request, error)
NewCreatePromiseRequestWithBody generates requests for CreatePromise with any type of body
func NewGetPromiseRequest ¶
func NewGetPromiseRequest(server string, id IdPath, params *GetPromiseParams) (*http.Request, error)
NewGetPromiseRequest generates requests for GetPromise
func NewPatchPromisesIdRequest ¶
func NewPatchPromisesIdRequest(server string, id IdPath, params *PatchPromisesIdParams, body PatchPromisesIdJSONRequestBody) (*http.Request, error)
NewPatchPromisesIdRequest calls the generic PatchPromisesId builder with application/json body
func NewPatchPromisesIdRequestWithBody ¶
func NewPatchPromisesIdRequestWithBody(server string, id IdPath, params *PatchPromisesIdParams, contentType string, body io.Reader) (*http.Request, error)
NewPatchPromisesIdRequestWithBody generates requests for PatchPromisesId with any type of body
func NewSearchPromisesRequest ¶
func NewSearchPromisesRequest(server string, params *SearchPromisesParams) (*http.Request, error)
NewSearchPromisesRequest generates requests for SearchPromises
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) CreatePromise ¶
func (c *Client) CreatePromise(ctx context.Context, params *CreatePromiseParams, body CreatePromiseJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) CreatePromiseWithBody ¶
func (*Client) GetPromise ¶
func (c *Client) GetPromise(ctx context.Context, id IdPath, params *GetPromiseParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) PatchPromisesId ¶
func (c *Client) PatchPromisesId(ctx context.Context, id IdPath, params *PatchPromisesIdParams, body PatchPromisesIdJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) PatchPromisesIdWithBody ¶
func (*Client) SearchPromises ¶
func (c *Client) SearchPromises(ctx context.Context, params *SearchPromisesParams, reqEditors ...RequestEditorFn) (*http.Response, error)
type ClientInterface ¶
type ClientInterface interface { // SearchPromises request SearchPromises(ctx context.Context, params *SearchPromisesParams, reqEditors ...RequestEditorFn) (*http.Response, error) // CreatePromiseWithBody request with any body CreatePromiseWithBody(ctx context.Context, params *CreatePromiseParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) CreatePromise(ctx context.Context, params *CreatePromiseParams, body CreatePromiseJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) // GetPromise request GetPromise(ctx context.Context, id IdPath, params *GetPromiseParams, reqEditors ...RequestEditorFn) (*http.Response, error) // PatchPromisesIdWithBody request with any body PatchPromisesIdWithBody(ctx context.Context, id IdPath, params *PatchPromisesIdParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) PatchPromisesId(ctx context.Context, id IdPath, params *PatchPromisesIdParams, body PatchPromisesIdJSONRequestBody, 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) CreatePromiseWithBodyWithResponse ¶
func (c *ClientWithResponses) CreatePromiseWithBodyWithResponse(ctx context.Context, params *CreatePromiseParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePromiseResponse, error)
CreatePromiseWithBodyWithResponse request with arbitrary body returning *CreatePromiseResponse
func (*ClientWithResponses) CreatePromiseWithResponse ¶
func (c *ClientWithResponses) CreatePromiseWithResponse(ctx context.Context, params *CreatePromiseParams, body CreatePromiseJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePromiseResponse, error)
func (*ClientWithResponses) GetPromiseWithResponse ¶
func (c *ClientWithResponses) GetPromiseWithResponse(ctx context.Context, id IdPath, params *GetPromiseParams, reqEditors ...RequestEditorFn) (*GetPromiseResponse, error)
GetPromiseWithResponse request returning *GetPromiseResponse
func (*ClientWithResponses) PatchPromisesIdWithBodyWithResponse ¶
func (c *ClientWithResponses) PatchPromisesIdWithBodyWithResponse(ctx context.Context, id IdPath, params *PatchPromisesIdParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchPromisesIdResponse, error)
PatchPromisesIdWithBodyWithResponse request with arbitrary body returning *PatchPromisesIdResponse
func (*ClientWithResponses) PatchPromisesIdWithResponse ¶
func (c *ClientWithResponses) PatchPromisesIdWithResponse(ctx context.Context, id IdPath, params *PatchPromisesIdParams, body PatchPromisesIdJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchPromisesIdResponse, error)
func (*ClientWithResponses) SearchPromisesWithResponse ¶
func (c *ClientWithResponses) SearchPromisesWithResponse(ctx context.Context, params *SearchPromisesParams, reqEditors ...RequestEditorFn) (*SearchPromisesResponse, error)
SearchPromisesWithResponse request returning *SearchPromisesResponse
type ClientWithResponsesInterface ¶
type ClientWithResponsesInterface interface { // SearchPromisesWithResponse request SearchPromisesWithResponse(ctx context.Context, params *SearchPromisesParams, reqEditors ...RequestEditorFn) (*SearchPromisesResponse, error) // CreatePromiseWithBodyWithResponse request with any body CreatePromiseWithBodyWithResponse(ctx context.Context, params *CreatePromiseParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePromiseResponse, error) CreatePromiseWithResponse(ctx context.Context, params *CreatePromiseParams, body CreatePromiseJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePromiseResponse, error) // GetPromiseWithResponse request GetPromiseWithResponse(ctx context.Context, id IdPath, params *GetPromiseParams, reqEditors ...RequestEditorFn) (*GetPromiseResponse, error) // PatchPromisesIdWithBodyWithResponse request with any body PatchPromisesIdWithBodyWithResponse(ctx context.Context, id IdPath, params *PatchPromisesIdParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchPromisesIdResponse, error) PatchPromisesIdWithResponse(ctx context.Context, id IdPath, params *PatchPromisesIdParams, body PatchPromisesIdJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchPromisesIdResponse, error) }
ClientWithResponsesInterface is the interface specification for the client with responses above.
type CompletePromiseReq ¶
type CompletePromiseReq struct { State PromiseStateComplete `json:"state"` Value *PromiseValue `json:"value,omitempty"` }
CompletePromiseReq defines model for CompletePromiseReq.
type CreatePromiseJSONRequestBody ¶
type CreatePromiseJSONRequestBody = CreatePromiseReq
CreatePromiseJSONRequestBody defines body for CreatePromise for application/json ContentType.
type CreatePromiseParams ¶
type CreatePromiseParams struct { // RequestId Unique ID for each request RequestId *RequestIdHeader `json:"request-id,omitempty"` // IdempotencyKey Deduplicates multiple requests IdempotencyKey *IdempotencyKeyHeader `json:"idempotency-key,omitempty"` // Strict If true, deduplicates only when promise state matches the request Strict *StrictHeader `json:"strict,omitempty"` }
CreatePromiseParams defines parameters for CreatePromise.
type CreatePromiseReq ¶
type CreatePromiseReq struct { Id string `json:"id"` Param *PromiseValue `json:"param,omitempty"` Tags *map[string]string `json:"tags,omitempty"` Timeout int64 `json:"timeout"` }
CreatePromiseReq defines model for CreatePromiseReq.
type CreatePromiseResponse ¶
type CreatePromiseResponse struct { Body []byte HTTPResponse *http.Response JSON200 *Promise JSON201 *Promise }
func ParseCreatePromiseResponse ¶
func ParseCreatePromiseResponse(rsp *http.Response) (*CreatePromiseResponse, error)
ParseCreatePromiseResponse parses an HTTP response from a CreatePromiseWithResponse call
func (CreatePromiseResponse) Status ¶
func (r CreatePromiseResponse) Status() string
Status returns HTTPResponse.Status
func (CreatePromiseResponse) StatusCode ¶
func (r CreatePromiseResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetPromiseParams ¶
type GetPromiseParams struct { // RequestId Unique ID for each request RequestId *RequestIdHeader `json:"request-id,omitempty"` }
GetPromiseParams defines parameters for GetPromise.
type GetPromiseResponse ¶
func ParseGetPromiseResponse ¶
func ParseGetPromiseResponse(rsp *http.Response) (*GetPromiseResponse, error)
ParseGetPromiseResponse parses an HTTP response from a GetPromiseWithResponse call
func (GetPromiseResponse) Status ¶
func (r GetPromiseResponse) Status() string
Status returns HTTPResponse.Status
func (GetPromiseResponse) StatusCode ¶
func (r GetPromiseResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type HttpRequestDoer ¶
Doer performs HTTP requests.
The standard http.Client implements this interface.
type IdempotencyKeyHeader ¶
type IdempotencyKeyHeader = string
IdempotencyKeyHeader defines model for IdempotencyKeyHeader.
type MockClientInterface ¶
type MockClientInterface struct {
// contains filtered or unexported fields
}
MockClientInterface is a mock of ClientInterface interface.
func NewMockClientInterface ¶
func NewMockClientInterface(ctrl *gomock.Controller) *MockClientInterface
NewMockClientInterface creates a new mock instance.
func (*MockClientInterface) CreatePromise ¶
func (m *MockClientInterface) CreatePromise(ctx context.Context, params *CreatePromiseParams, body CreatePromiseJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
CreatePromise mocks base method.
func (*MockClientInterface) CreatePromiseWithBody ¶
func (m *MockClientInterface) CreatePromiseWithBody(ctx context.Context, params *CreatePromiseParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
CreatePromiseWithBody mocks base method.
func (*MockClientInterface) EXPECT ¶
func (m *MockClientInterface) EXPECT() *MockClientInterfaceMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockClientInterface) GetPromise ¶
func (m *MockClientInterface) GetPromise(ctx context.Context, id IdPath, params *GetPromiseParams, reqEditors ...RequestEditorFn) (*http.Response, error)
GetPromise mocks base method.
func (*MockClientInterface) PatchPromisesId ¶
func (m *MockClientInterface) PatchPromisesId(ctx context.Context, id IdPath, params *PatchPromisesIdParams, body PatchPromisesIdJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
PatchPromisesId mocks base method.
func (*MockClientInterface) PatchPromisesIdWithBody ¶
func (m *MockClientInterface) PatchPromisesIdWithBody(ctx context.Context, id IdPath, params *PatchPromisesIdParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
PatchPromisesIdWithBody mocks base method.
func (*MockClientInterface) SearchPromises ¶
func (m *MockClientInterface) SearchPromises(ctx context.Context, params *SearchPromisesParams, reqEditors ...RequestEditorFn) (*http.Response, error)
SearchPromises mocks base method.
type MockClientInterfaceMockRecorder ¶
type MockClientInterfaceMockRecorder struct {
// contains filtered or unexported fields
}
MockClientInterfaceMockRecorder is the mock recorder for MockClientInterface.
func (*MockClientInterfaceMockRecorder) CreatePromise ¶
func (mr *MockClientInterfaceMockRecorder) CreatePromise(ctx, params, body interface{}, reqEditors ...interface{}) *gomock.Call
CreatePromise indicates an expected call of CreatePromise.
func (*MockClientInterfaceMockRecorder) CreatePromiseWithBody ¶
func (mr *MockClientInterfaceMockRecorder) CreatePromiseWithBody(ctx, params, contentType, body interface{}, reqEditors ...interface{}) *gomock.Call
CreatePromiseWithBody indicates an expected call of CreatePromiseWithBody.
func (*MockClientInterfaceMockRecorder) GetPromise ¶
func (mr *MockClientInterfaceMockRecorder) GetPromise(ctx, id, params interface{}, reqEditors ...interface{}) *gomock.Call
GetPromise indicates an expected call of GetPromise.
func (*MockClientInterfaceMockRecorder) PatchPromisesId ¶
func (mr *MockClientInterfaceMockRecorder) PatchPromisesId(ctx, id, params, body interface{}, reqEditors ...interface{}) *gomock.Call
PatchPromisesId indicates an expected call of PatchPromisesId.
func (*MockClientInterfaceMockRecorder) PatchPromisesIdWithBody ¶
func (mr *MockClientInterfaceMockRecorder) PatchPromisesIdWithBody(ctx, id, params, contentType, body interface{}, reqEditors ...interface{}) *gomock.Call
PatchPromisesIdWithBody indicates an expected call of PatchPromisesIdWithBody.
func (*MockClientInterfaceMockRecorder) SearchPromises ¶
func (mr *MockClientInterfaceMockRecorder) SearchPromises(ctx, params interface{}, reqEditors ...interface{}) *gomock.Call
SearchPromises indicates an expected call of SearchPromises.
type MockClientWithResponsesInterface ¶
type MockClientWithResponsesInterface struct {
// contains filtered or unexported fields
}
MockClientWithResponsesInterface is a mock of ClientWithResponsesInterface interface.
func NewMockClientWithResponsesInterface ¶
func NewMockClientWithResponsesInterface(ctrl *gomock.Controller) *MockClientWithResponsesInterface
NewMockClientWithResponsesInterface creates a new mock instance.
func (*MockClientWithResponsesInterface) CreatePromiseWithBodyWithResponse ¶
func (m *MockClientWithResponsesInterface) CreatePromiseWithBodyWithResponse(ctx context.Context, params *CreatePromiseParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePromiseResponse, error)
CreatePromiseWithBodyWithResponse mocks base method.
func (*MockClientWithResponsesInterface) CreatePromiseWithResponse ¶
func (m *MockClientWithResponsesInterface) CreatePromiseWithResponse(ctx context.Context, params *CreatePromiseParams, body CreatePromiseJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePromiseResponse, error)
CreatePromiseWithResponse mocks base method.
func (*MockClientWithResponsesInterface) EXPECT ¶
func (m *MockClientWithResponsesInterface) EXPECT() *MockClientWithResponsesInterfaceMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockClientWithResponsesInterface) GetPromiseWithResponse ¶
func (m *MockClientWithResponsesInterface) GetPromiseWithResponse(ctx context.Context, id IdPath, params *GetPromiseParams, reqEditors ...RequestEditorFn) (*GetPromiseResponse, error)
GetPromiseWithResponse mocks base method.
func (*MockClientWithResponsesInterface) PatchPromisesIdWithBodyWithResponse ¶
func (m *MockClientWithResponsesInterface) PatchPromisesIdWithBodyWithResponse(ctx context.Context, id IdPath, params *PatchPromisesIdParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchPromisesIdResponse, error)
PatchPromisesIdWithBodyWithResponse mocks base method.
func (*MockClientWithResponsesInterface) PatchPromisesIdWithResponse ¶
func (m *MockClientWithResponsesInterface) PatchPromisesIdWithResponse(ctx context.Context, id IdPath, params *PatchPromisesIdParams, body PatchPromisesIdJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchPromisesIdResponse, error)
PatchPromisesIdWithResponse mocks base method.
func (*MockClientWithResponsesInterface) SearchPromisesWithResponse ¶
func (m *MockClientWithResponsesInterface) SearchPromisesWithResponse(ctx context.Context, params *SearchPromisesParams, reqEditors ...RequestEditorFn) (*SearchPromisesResponse, error)
SearchPromisesWithResponse mocks base method.
type MockClientWithResponsesInterfaceMockRecorder ¶
type MockClientWithResponsesInterfaceMockRecorder struct {
// contains filtered or unexported fields
}
MockClientWithResponsesInterfaceMockRecorder is the mock recorder for MockClientWithResponsesInterface.
func (*MockClientWithResponsesInterfaceMockRecorder) CreatePromiseWithBodyWithResponse ¶
func (mr *MockClientWithResponsesInterfaceMockRecorder) CreatePromiseWithBodyWithResponse(ctx, params, contentType, body interface{}, reqEditors ...interface{}) *gomock.Call
CreatePromiseWithBodyWithResponse indicates an expected call of CreatePromiseWithBodyWithResponse.
func (*MockClientWithResponsesInterfaceMockRecorder) CreatePromiseWithResponse ¶
func (mr *MockClientWithResponsesInterfaceMockRecorder) CreatePromiseWithResponse(ctx, params, body interface{}, reqEditors ...interface{}) *gomock.Call
CreatePromiseWithResponse indicates an expected call of CreatePromiseWithResponse.
func (*MockClientWithResponsesInterfaceMockRecorder) GetPromiseWithResponse ¶
func (mr *MockClientWithResponsesInterfaceMockRecorder) GetPromiseWithResponse(ctx, id, params interface{}, reqEditors ...interface{}) *gomock.Call
GetPromiseWithResponse indicates an expected call of GetPromiseWithResponse.
func (*MockClientWithResponsesInterfaceMockRecorder) PatchPromisesIdWithBodyWithResponse ¶
func (mr *MockClientWithResponsesInterfaceMockRecorder) PatchPromisesIdWithBodyWithResponse(ctx, id, params, contentType, body interface{}, reqEditors ...interface{}) *gomock.Call
PatchPromisesIdWithBodyWithResponse indicates an expected call of PatchPromisesIdWithBodyWithResponse.
func (*MockClientWithResponsesInterfaceMockRecorder) PatchPromisesIdWithResponse ¶
func (mr *MockClientWithResponsesInterfaceMockRecorder) PatchPromisesIdWithResponse(ctx, id, params, body interface{}, reqEditors ...interface{}) *gomock.Call
PatchPromisesIdWithResponse indicates an expected call of PatchPromisesIdWithResponse.
func (*MockClientWithResponsesInterfaceMockRecorder) SearchPromisesWithResponse ¶
func (mr *MockClientWithResponsesInterfaceMockRecorder) SearchPromisesWithResponse(ctx, params interface{}, reqEditors ...interface{}) *gomock.Call
SearchPromisesWithResponse indicates an expected call of SearchPromisesWithResponse.
type MockHttpRequestDoer ¶
type MockHttpRequestDoer struct {
// contains filtered or unexported fields
}
MockHttpRequestDoer is a mock of HttpRequestDoer interface.
func NewMockHttpRequestDoer ¶
func NewMockHttpRequestDoer(ctrl *gomock.Controller) *MockHttpRequestDoer
NewMockHttpRequestDoer creates a new mock instance.
func (*MockHttpRequestDoer) EXPECT ¶
func (m *MockHttpRequestDoer) EXPECT() *MockHttpRequestDoerMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockHttpRequestDoerMockRecorder ¶
type MockHttpRequestDoerMockRecorder struct {
// contains filtered or unexported fields
}
MockHttpRequestDoerMockRecorder is the mock recorder for MockHttpRequestDoer.
func (*MockHttpRequestDoerMockRecorder) Do ¶
func (mr *MockHttpRequestDoerMockRecorder) Do(req interface{}) *gomock.Call
Do indicates an expected call of Do.
type PatchPromisesIdJSONRequestBody ¶
type PatchPromisesIdJSONRequestBody = CompletePromiseReq
PatchPromisesIdJSONRequestBody defines body for PatchPromisesId for application/json ContentType.
type PatchPromisesIdParams ¶
type PatchPromisesIdParams struct { // RequestId Unique ID for each request RequestId *RequestIdHeader `json:"request-id,omitempty"` // IdempotencyKey Deduplicates multiple requests IdempotencyKey *IdempotencyKeyHeader `json:"idempotency-key,omitempty"` // Strict If true, deduplicates only when promise state matches the request Strict *StrictHeader `json:"strict,omitempty"` }
PatchPromisesIdParams defines parameters for PatchPromisesId.
type PatchPromisesIdResponse ¶
func ParsePatchPromisesIdResponse ¶
func ParsePatchPromisesIdResponse(rsp *http.Response) (*PatchPromisesIdResponse, error)
ParsePatchPromisesIdResponse parses an HTTP response from a PatchPromisesIdWithResponse call
func (PatchPromisesIdResponse) Status ¶
func (r PatchPromisesIdResponse) Status() string
Status returns HTTPResponse.Status
func (PatchPromisesIdResponse) StatusCode ¶
func (r PatchPromisesIdResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type Promise ¶
type Promise struct { CompletedOn *int `json:"completedOn,omitempty"` CreatedOn *int `json:"createdOn,omitempty"` Id string `json:"id"` IdempotencyKeyForComplete *string `json:"idempotencyKeyForComplete,omitempty"` IdempotencyKeyForCreate *string `json:"idempotencyKeyForCreate,omitempty"` Param PromiseValue `json:"param"` State PromiseState `json:"state"` Tags map[string]string `json:"tags"` Timeout int64 `json:"timeout"` Value PromiseValue `json:"value"` }
Promise defines model for Promise.
type PromiseState ¶
type PromiseState string
PromiseState defines model for PromiseState.
const ( PromiseStatePENDING PromiseState = "PENDING" PromiseStateREJECTED PromiseState = "REJECTED" PromiseStateREJECTEDCANCELED PromiseState = "REJECTED_CANCELED" PromiseStateREJECTEDTIMEDOUT PromiseState = "REJECTED_TIMEDOUT" PromiseStateRESOLVED PromiseState = "RESOLVED" )
Defines values for PromiseState.
type PromiseStateComplete ¶
type PromiseStateComplete string
PromiseStateComplete defines model for PromiseStateComplete.
const ( PromiseStateCompleteREJECTED PromiseStateComplete = "REJECTED" PromiseStateCompleteREJECTEDCANCELED PromiseStateComplete = "REJECTED_CANCELED" PromiseStateCompleteRESOLVED PromiseStateComplete = "RESOLVED" )
Defines values for PromiseStateComplete.
type PromiseValue ¶
type PromiseValue struct { Data *string `json:"data,omitempty"` Headers map[string]string `json:"headers"` }
PromiseValue defines model for PromiseValue.
type RequestEditorFn ¶
RequestEditorFn is the function signature for the RequestEditor callback function
type RequestIdHeader ¶
type RequestIdHeader = string
RequestIdHeader defines model for RequestIdHeader.
type SearchPromisesParams ¶
type SearchPromisesParams struct { // Id Search promises for matching IDs, can include wildcards. // // For example: // - "foo/*" matches all IDs starting with "foo/" // - "*/bar" matches all IDs starting with "bar/" // - "foo/*/bar" matches all IDs starting with "foo/" and ending with "/bar" Id *string `form:"id,omitempty" json:"id,omitempty"` // State Search promises for matching states State *SearchPromisesParamsState `form:"state,omitempty" json:"state,omitempty"` Tags *map[string]string `json:"tags,omitempty"` // Limit Number of results Limit *int `form:"limit,omitempty" json:"limit,omitempty"` // Cursor Cursor for pagination Cursor *string `form:"cursor,omitempty" json:"cursor,omitempty"` // RequestId Unique ID for each request RequestId *RequestIdHeader `json:"request-id,omitempty"` }
SearchPromisesParams defines parameters for SearchPromises.
type SearchPromisesParamsState ¶
type SearchPromisesParamsState string
SearchPromisesParamsState defines parameters for SearchPromises.
const ( Pending SearchPromisesParamsState = "pending" Rejected SearchPromisesParamsState = "rejected" Resolved SearchPromisesParamsState = "resolved" )
Defines values for SearchPromisesParamsState.
type SearchPromisesResp ¶
type SearchPromisesResp struct { Cursor *string `json:"cursor,omitempty"` Promises *[]Promise `json:"promises,omitempty"` }
SearchPromisesResp defines model for SearchPromisesResp.
type SearchPromisesResponse ¶
type SearchPromisesResponse struct { Body []byte HTTPResponse *http.Response JSON200 *SearchPromisesResp }
func ParseSearchPromisesResponse ¶
func ParseSearchPromisesResponse(rsp *http.Response) (*SearchPromisesResponse, error)
ParseSearchPromisesResponse parses an HTTP response from a SearchPromisesWithResponse call
func (SearchPromisesResponse) Status ¶
func (r SearchPromisesResponse) Status() string
Status returns HTTPResponse.Status
func (SearchPromisesResponse) StatusCode ¶
func (r SearchPromisesResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode