Documentation ¶
Overview ¶
Package datakioskv20231115 provides primitives to interact with the openapi HTTP API.
Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.4.1 DO NOT EDIT.
Index ¶
- func NewCancelQueryRequest(server string, queryId string) (*http.Request, error)
- func NewCreateQueryRequest(server string, body CreateQueryJSONRequestBody) (*http.Request, error)
- func NewCreateQueryRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewGetDocumentRequest(server string, documentId string) (*http.Request, error)
- func NewGetQueriesRequest(server string, params *GetQueriesParams) (*http.Request, error)
- func NewGetQueryRequest(server string, queryId string) (*http.Request, error)
- type CancelQueryResp
- type Client
- func (c *Client) CancelQuery(ctx context.Context, queryId string) (*http.Response, error)
- func (c *Client) CreateQuery(ctx context.Context, body CreateQueryJSONRequestBody) (*http.Response, error)
- func (c *Client) CreateQueryWithBody(ctx context.Context, contentType string, body io.Reader) (*http.Response, error)
- func (c *Client) GetDocument(ctx context.Context, documentId string) (*http.Response, error)
- func (c *Client) GetQueries(ctx context.Context, params *GetQueriesParams) (*http.Response, error)
- func (c *Client) GetQuery(ctx context.Context, queryId string) (*http.Response, error)
- type ClientInterface
- type ClientOption
- type ClientWithResponses
- func (c *ClientWithResponses) CancelQueryWithResponse(ctx context.Context, queryId string) (*CancelQueryResp, error)
- func (c *ClientWithResponses) CreateQueryWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader) (*CreateQueryResp, error)
- func (c *ClientWithResponses) CreateQueryWithResponse(ctx context.Context, body CreateQueryJSONRequestBody) (*CreateQueryResp, error)
- func (c *ClientWithResponses) GetDocumentWithResponse(ctx context.Context, documentId string) (*GetDocumentResp, error)
- func (c *ClientWithResponses) GetQueriesWithResponse(ctx context.Context, params *GetQueriesParams) (*GetQueriesResp, error)
- func (c *ClientWithResponses) GetQueryWithResponse(ctx context.Context, queryId string) (*GetQueryResp, error)
- type ClientWithResponsesInterface
- type CreateQueryJSONRequestBody
- type CreateQueryResp
- type CreateQueryResponse
- type CreateQuerySpecification
- type Error
- type ErrorList
- type GetDocumentResp
- type GetDocumentResponse
- type GetQueriesParams
- type GetQueriesParamsProcessingStatuses
- type GetQueriesResp
- type GetQueriesResponse
- type GetQueryResp
- type HttpRequestDoer
- type Query
- type QueryList
- type QueryProcessingStatus
- type RequestEditorFn
- type ResponseEditorFn
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCancelQueryRequest ¶
NewCancelQueryRequest generates requests for CancelQuery
func NewCreateQueryRequest ¶
func NewCreateQueryRequest(server string, body CreateQueryJSONRequestBody) (*http.Request, error)
NewCreateQueryRequest calls the generic CreateQuery builder with application/json body
func NewCreateQueryRequestWithBody ¶
func NewCreateQueryRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewCreateQueryRequestWithBody generates requests for CreateQuery with any type of body
func NewGetDocumentRequest ¶
NewGetDocumentRequest generates requests for GetDocument
func NewGetQueriesRequest ¶
func NewGetQueriesRequest(server string, params *GetQueriesParams) (*http.Request, error)
NewGetQueriesRequest generates requests for GetQueries
Types ¶
type CancelQueryResp ¶
type CancelQueryResp struct { Body []byte HTTPResponse *http.Response JSON400 *ErrorList JSON403 *ErrorList JSON404 *ErrorList JSON413 *ErrorList JSON415 *ErrorList JSON429 *ErrorList JSON500 *ErrorList JSON503 *ErrorList }
func ParseCancelQueryResp ¶
func ParseCancelQueryResp(rsp *http.Response) (*CancelQueryResp, error)
ParseCancelQueryResp parses an HTTP response from a CancelQueryWithResponse call
func (CancelQueryResp) Status ¶
func (r CancelQueryResp) Status() string
Status returns HTTPResponse.Status
func (CancelQueryResp) StatusCode ¶
func (r CancelQueryResp) 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 // A callback for modifying response which are generated after receive from the network. ResponseEditors []ResponseEditorFn // The user agent header identifies your application, its version number, and the platform and programming language you are using. // You must include a user agent header in each request submitted to the sales partner API. UserAgent string }
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) CancelQuery ¶
func (*Client) CreateQuery ¶
func (*Client) CreateQueryWithBody ¶
func (*Client) GetDocument ¶
func (*Client) GetQueries ¶
type ClientInterface ¶
type ClientInterface interface { // GetDocument request GetDocument(ctx context.Context, documentId string) (*http.Response, error) // GetQueries request GetQueries(ctx context.Context, params *GetQueriesParams) (*http.Response, error) // CreateQueryWithBody request with any body CreateQueryWithBody(ctx context.Context, contentType string, body io.Reader) (*http.Response, error) CreateQuery(ctx context.Context, body CreateQueryJSONRequestBody) (*http.Response, error) // CancelQuery request CancelQuery(ctx context.Context, queryId string) (*http.Response, error) // GetQuery request GetQuery(ctx context.Context, queryId string) (*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.
func WithResponseEditorFn ¶
func WithResponseEditorFn(fn ResponseEditorFn) ClientOption
WithResponseEditorFn allows setting up a callback function, which will be called right after receive the response.
type ClientWithResponses ¶
type ClientWithResponses struct {
ClientInterface
}
func NewClientWithResponses ¶
func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error)
NewClientWithResponses creates a new ClientWithResponses, which wraps Client with return type handling
func (*ClientWithResponses) CancelQueryWithResponse ¶
func (c *ClientWithResponses) CancelQueryWithResponse(ctx context.Context, queryId string) (*CancelQueryResp, error)
CancelQueryWithResponse request returning *CancelQueryResp
func (*ClientWithResponses) CreateQueryWithBodyWithResponse ¶
func (c *ClientWithResponses) CreateQueryWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader) (*CreateQueryResp, error)
CreateQueryWithBodyWithResponse request with arbitrary body returning *CreateQueryResp
func (*ClientWithResponses) CreateQueryWithResponse ¶
func (c *ClientWithResponses) CreateQueryWithResponse(ctx context.Context, body CreateQueryJSONRequestBody) (*CreateQueryResp, error)
func (*ClientWithResponses) GetDocumentWithResponse ¶
func (c *ClientWithResponses) GetDocumentWithResponse(ctx context.Context, documentId string) (*GetDocumentResp, error)
GetDocumentWithResponse request returning *GetDocumentResp
func (*ClientWithResponses) GetQueriesWithResponse ¶
func (c *ClientWithResponses) GetQueriesWithResponse(ctx context.Context, params *GetQueriesParams) (*GetQueriesResp, error)
GetQueriesWithResponse request returning *GetQueriesResp
func (*ClientWithResponses) GetQueryWithResponse ¶
func (c *ClientWithResponses) GetQueryWithResponse(ctx context.Context, queryId string) (*GetQueryResp, error)
GetQueryWithResponse request returning *GetQueryResp
type ClientWithResponsesInterface ¶
type ClientWithResponsesInterface interface { // GetDocumentWithResponse request GetDocumentWithResponse(ctx context.Context, documentId string) (*GetDocumentResp, error) // GetQueriesWithResponse request GetQueriesWithResponse(ctx context.Context, params *GetQueriesParams) (*GetQueriesResp, error) // CreateQueryWithBodyWithResponse request with any body CreateQueryWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader) (*CreateQueryResp, error) CreateQueryWithResponse(ctx context.Context, body CreateQueryJSONRequestBody) (*CreateQueryResp, error) // CancelQueryWithResponse request CancelQueryWithResponse(ctx context.Context, queryId string) (*CancelQueryResp, error) // GetQueryWithResponse request GetQueryWithResponse(ctx context.Context, queryId string) (*GetQueryResp, error) }
ClientWithResponsesInterface is the interface specification for the client with responses above.
type CreateQueryJSONRequestBody ¶
type CreateQueryJSONRequestBody = CreateQuerySpecification
CreateQueryJSONRequestBody defines body for CreateQuery for application/json ContentType.
type CreateQueryResp ¶
type CreateQueryResp struct { Body []byte HTTPResponse *http.Response JSON202 *CreateQueryResponse JSON400 *ErrorList JSON403 *ErrorList JSON404 *ErrorList JSON413 *ErrorList JSON415 *ErrorList JSON429 *ErrorList JSON500 *ErrorList JSON503 *ErrorList }
func ParseCreateQueryResp ¶
func ParseCreateQueryResp(rsp *http.Response) (*CreateQueryResp, error)
ParseCreateQueryResp parses an HTTP response from a CreateQueryWithResponse call
func (CreateQueryResp) Status ¶
func (r CreateQueryResp) Status() string
Status returns HTTPResponse.Status
func (CreateQueryResp) StatusCode ¶
func (r CreateQueryResp) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type CreateQueryResponse ¶
type CreateQueryResponse struct { // QueryId The identifier for the query. This identifier is unique only in combination with a selling partner account ID. QueryId string `json:"queryId"` }
CreateQueryResponse The response for the `createQuery` operation.
type CreateQuerySpecification ¶
type CreateQuerySpecification struct { // PaginationToken A token to fetch a certain page of query results when there are multiple pages of query results available. The value of this token must be fetched from the `pagination.nextToken` field of the `Query` object, and the `query` field for this object must also be set to the `query` field of the same `Query` object. A `Query` object can be retrieved from either the `getQueries` or `getQuery` operation. In the absence of this token value, the first page of query results will be requested. PaginationToken *string `json:"paginationToken,omitempty"` // Query The GraphQL query to submit. A query must be at most 8000 characters after unnecessary whitespace is removed. Query string `json:"query"` }
CreateQuerySpecification Information required to create the query.
type Error ¶
type Error struct { // Code An error code that identifies the type of error that occurred. Code string `json:"code"` // Details Additional details that can help the caller understand or fix the issue. Details *string `json:"details,omitempty"` // Message A message that describes the error condition. Message string `json:"message"` }
Error Error response returned when the request is unsuccessful.
type ErrorList ¶
type ErrorList struct { // Errors Error response returned when the request is unsuccessful. Errors []Error `json:"errors"` }
ErrorList A list of error responses returned when a request is unsuccessful.
type GetDocumentResp ¶
type GetDocumentResp struct { Body []byte HTTPResponse *http.Response JSON200 *GetDocumentResponse JSON400 *ErrorList JSON403 *ErrorList JSON404 *ErrorList JSON413 *ErrorList JSON415 *ErrorList JSON429 *ErrorList JSON500 *ErrorList JSON503 *ErrorList }
func ParseGetDocumentResp ¶
func ParseGetDocumentResp(rsp *http.Response) (*GetDocumentResp, error)
ParseGetDocumentResp parses an HTTP response from a GetDocumentWithResponse call
func (GetDocumentResp) Status ¶
func (r GetDocumentResp) Status() string
Status returns HTTPResponse.Status
func (GetDocumentResp) StatusCode ¶
func (r GetDocumentResp) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetDocumentResponse ¶
type GetDocumentResponse struct { // DocumentId The identifier for the Data Kiosk document. This identifier is unique only in combination with a selling partner account ID. DocumentId string `json:"documentId"` // DocumentUrl A presigned URL that can be used to retrieve the Data Kiosk document. This URL expires after 5 minutes. If the Data Kiosk document is compressed, the `Content-Encoding` header will indicate the compression algorithm. // // **Note:** Most HTTP clients are capable of automatically decompressing downloaded files based on the `Content-Encoding` header. DocumentUrl string `json:"documentUrl"` }
GetDocumentResponse The response for the `getDocument` operation.
type GetQueriesParams ¶
type GetQueriesParams struct { // ProcessingStatuses A list of processing statuses used to filter queries. ProcessingStatuses *[]GetQueriesParamsProcessingStatuses `form:"processingStatuses,omitempty" json:"processingStatuses,omitempty"` // PageSize The maximum number of queries to return in a single call. PageSize *int `form:"pageSize,omitempty" json:"pageSize,omitempty"` // CreatedSince The earliest query creation date and time for queries to include in the response, in ISO 8601 date time format. The default is 90 days ago. CreatedSince *time.Time `form:"createdSince,omitempty" json:"createdSince,omitempty"` // CreatedUntil The latest query creation date and time for queries to include in the response, in ISO 8601 date time format. The default is the time of the `getQueries` request. CreatedUntil *time.Time `form:"createdUntil,omitempty" json:"createdUntil,omitempty"` // PaginationToken A token to fetch a certain page of results when there are multiple pages of results available. The value of this token is fetched from the `pagination.nextToken` field returned in the `GetQueriesResponse` object. All other parameters must be provided with the same values that were provided with the request that generated this token, with the exception of `pageSize` which can be modified between calls to `getQueries`. In the absence of this token value, `getQueries` returns the first page of results. PaginationToken *string `form:"paginationToken,omitempty" json:"paginationToken,omitempty"` }
GetQueriesParams defines parameters for GetQueries.
type GetQueriesParamsProcessingStatuses ¶
type GetQueriesParamsProcessingStatuses string
GetQueriesParamsProcessingStatuses defines parameters for GetQueries.
const ( GetQueriesParamsProcessingStatusesCANCELLED GetQueriesParamsProcessingStatuses = "CANCELLED" GetQueriesParamsProcessingStatusesDONE GetQueriesParamsProcessingStatuses = "DONE" GetQueriesParamsProcessingStatusesFATAL GetQueriesParamsProcessingStatuses = "FATAL" GetQueriesParamsProcessingStatusesINPROGRESS GetQueriesParamsProcessingStatuses = "IN_PROGRESS" GetQueriesParamsProcessingStatusesINQUEUE GetQueriesParamsProcessingStatuses = "IN_QUEUE" )
Defines values for GetQueriesParamsProcessingStatuses.
type GetQueriesResp ¶
type GetQueriesResp struct { Body []byte HTTPResponse *http.Response JSON200 *GetQueriesResponse JSON400 *ErrorList JSON403 *ErrorList JSON404 *ErrorList JSON413 *ErrorList JSON415 *ErrorList JSON429 *ErrorList JSON500 *ErrorList JSON503 *ErrorList }
func ParseGetQueriesResp ¶
func ParseGetQueriesResp(rsp *http.Response) (*GetQueriesResp, error)
ParseGetQueriesResp parses an HTTP response from a GetQueriesWithResponse call
func (GetQueriesResp) Status ¶
func (r GetQueriesResp) Status() string
Status returns HTTPResponse.Status
func (GetQueriesResp) StatusCode ¶
func (r GetQueriesResp) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetQueriesResponse ¶
type GetQueriesResponse struct { // Pagination When a request has results that are not included in this response, pagination occurs. This means the results are divided into pages. To retrieve the next page, you must pass the `nextToken` as the `paginationToken` query parameter in the subsequent `getQueries` request. All other parameters must be provided with the same values that were provided with the request that generated this token, with the exception of `pageSize` which can be modified between calls to `getQueries`. When there are no more pages to fetch, the `nextToken` field will be absent. Pagination *struct { // NextToken A token that can be used to fetch the next page of results. NextToken *string `json:"nextToken,omitempty"` } `json:"pagination,omitempty"` // Queries A list of queries. Queries QueryList `json:"queries"` }
GetQueriesResponse The response for the `getQueries` operation.
type GetQueryResp ¶
type GetQueryResp struct { Body []byte HTTPResponse *http.Response JSON200 *Query JSON400 *ErrorList JSON403 *ErrorList JSON404 *ErrorList JSON413 *ErrorList JSON415 *ErrorList JSON429 *ErrorList JSON500 *ErrorList JSON503 *ErrorList }
func ParseGetQueryResp ¶
func ParseGetQueryResp(rsp *http.Response) (*GetQueryResp, error)
ParseGetQueryResp parses an HTTP response from a GetQueryWithResponse call
func (GetQueryResp) Status ¶
func (r GetQueryResp) Status() string
Status returns HTTPResponse.Status
func (GetQueryResp) StatusCode ¶
func (r GetQueryResp) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type HttpRequestDoer ¶
Doer performs HTTP requests.
The standard http.Client implements this interface.
type Query ¶
type Query struct { // CreatedTime The date and time when the query was created, in ISO 8601 date time format. CreatedTime time.Time `json:"createdTime"` // DataDocumentId The data document identifier. This identifier is only present when there is data available as a result of the query. This identifier is unique only in combination with a selling partner account ID. Pass this identifier into the `getDocument` operation to get the information required to retrieve the data document's contents. DataDocumentId *string `json:"dataDocumentId,omitempty"` // ErrorDocumentId The error document identifier. This identifier is only present when an error occurs during query processing. This identifier is unique only in combination with a selling partner account ID. Pass this identifier into the `getDocument` operation to get the information required to retrieve the error document's contents. ErrorDocumentId *string `json:"errorDocumentId,omitempty"` // Pagination When a query produces results that are not included in the data document, pagination occurs. This means the results are divided into pages. To retrieve the next page, you must pass a `CreateQuerySpecification` object with `paginationToken` set to this object's `nextToken` and with `query` set to this object's `query` in the subsequent `createQuery` request. When there are no more pages to fetch, the `nextToken` field will be absent. Pagination *struct { // NextToken A token that can be used to fetch the next page of results. NextToken *string `json:"nextToken,omitempty"` } `json:"pagination,omitempty"` // ProcessingEndTime The date and time when the query processing completed, in ISO 8601 date time format. ProcessingEndTime *time.Time `json:"processingEndTime,omitempty"` // ProcessingStartTime The date and time when the query processing started, in ISO 8601 date time format. ProcessingStartTime *time.Time `json:"processingStartTime,omitempty"` // ProcessingStatus The processing status of the query. ProcessingStatus QueryProcessingStatus `json:"processingStatus"` // Query The submitted query. Query string `json:"query"` // QueryId The query identifier. This identifier is unique only in combination with a selling partner account ID. QueryId string `json:"queryId"` }
Query Detailed information about the query.
type QueryProcessingStatus ¶
type QueryProcessingStatus string
QueryProcessingStatus The processing status of the query.
const ( QueryProcessingStatusCANCELLED QueryProcessingStatus = "CANCELLED" QueryProcessingStatusDONE QueryProcessingStatus = "DONE" QueryProcessingStatusFATAL QueryProcessingStatus = "FATAL" QueryProcessingStatusINPROGRESS QueryProcessingStatus = "IN_PROGRESS" QueryProcessingStatusINQUEUE QueryProcessingStatus = "IN_QUEUE" )
Defines values for QueryProcessingStatus.
type RequestEditorFn ¶
RequestEditorFn is the function signature for the RequestEditor callback function