Documentation
¶
Overview ¶
Package partition 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.
Package partition is a Go client for the Unstructured Partition API.
Example ¶
package main
import (
"bytes"
"context"
"io"
"mime/multipart"
"net/http"
"os"
"github.com/psyb0t/go-unstructured/partition"
)
func main() {
var body bytes.Buffer
writer := multipart.NewWriter(&body)
file, err := writer.CreateFormFile("files", "document.txt")
if err != nil {
panic(err)
}
if _, err := io.WriteString(file, "A short document."); err != nil {
panic(err)
}
if err := writer.Close(); err != nil {
panic(err)
}
auth := partition.WithRequestEditorFn(
func(_ context.Context, req *http.Request) error {
req.Header.Set(
"unstructured-api-key",
os.Getenv("UNSTRUCTURED_API_KEY"),
)
return nil
},
)
client, err := partition.NewClientWithResponses(
"https://api.unstructuredapp.io",
auth,
)
if err != nil {
panic(err)
}
res, err := client.PartitionWithBodyWithResponse(
context.Background(),
&partition.PartitionParams{},
writer.FormDataContentType(),
&body,
)
if err != nil {
panic(err)
}
_ = res.JSON200
}
Output:
Index ¶
- func NewPartitionRequestWithBody(server string, params *PartitionParams, contentType string, body io.Reader) (*http.Request, error)
- type CSVElement
- type Client
- type ClientInterface
- type ClientOption
- type ClientWithResponses
- type ClientWithResponsesInterface
- type Element
- type HTTPValidationError
- type HTTPValidationErrorDetail0
- type HTTPValidationErrorDetail1
- type HTTPValidationError_Detail
- func (t HTTPValidationError_Detail) AsHTTPValidationErrorDetail0() (HTTPValidationErrorDetail0, error)
- func (t HTTPValidationError_Detail) AsHTTPValidationErrorDetail1() (HTTPValidationErrorDetail1, error)
- func (t *HTTPValidationError_Detail) FromHTTPValidationErrorDetail0(v HTTPValidationErrorDetail0) error
- func (t *HTTPValidationError_Detail) FromHTTPValidationErrorDetail1(v HTTPValidationErrorDetail1) error
- func (t HTTPValidationError_Detail) MarshalJSON() ([]byte, error)
- func (t *HTTPValidationError_Detail) MergeHTTPValidationErrorDetail0(v HTTPValidationErrorDetail0) error
- func (t *HTTPValidationError_Detail) MergeHTTPValidationErrorDetail1(v HTTPValidationErrorDetail1) error
- func (t *HTTPValidationError_Detail) UnmarshalJSON(b []byte) error
- type HttpRequestDoer
- type PartitionMultipartRequestBody
- type PartitionParameters
- type PartitionParametersOutputFormat
- type PartitionParametersStrategy
- type PartitionParametersVlmModelProvider
- type PartitionParams
- type PartitionResponse
- func (r PartitionResponse) ContentType() string
- func (r PartitionResponse) GetBody() []byte
- func (r PartitionResponse) GetJSON5XX() *ServerError
- func (r PartitionResponse) GetJSON200() *[]Element
- func (r PartitionResponse) GetJSON422() *HTTPValidationError
- func (r PartitionResponse) Status() string
- func (r PartitionResponse) StatusCode() int
- type PartitionResponse200Headers
- type RequestEditorFn
- type ServerError
- type ValidationError
- type ValidationErrorLoc0
- type ValidationErrorLoc1
- type ValidationError_Loc_Item
- func (t ValidationError_Loc_Item) AsValidationErrorLoc0() (ValidationErrorLoc0, error)
- func (t ValidationError_Loc_Item) AsValidationErrorLoc1() (ValidationErrorLoc1, error)
- func (t *ValidationError_Loc_Item) FromValidationErrorLoc0(v ValidationErrorLoc0) error
- func (t *ValidationError_Loc_Item) FromValidationErrorLoc1(v ValidationErrorLoc1) error
- func (t ValidationError_Loc_Item) MarshalJSON() ([]byte, error)
- func (t *ValidationError_Loc_Item) MergeValidationErrorLoc0(v ValidationErrorLoc0) error
- func (t *ValidationError_Loc_Item) MergeValidationErrorLoc1(v ValidationErrorLoc1) error
- func (t *ValidationError_Loc_Item) UnmarshalJSON(b []byte) error
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewPartitionRequestWithBody ¶
func NewPartitionRequestWithBody(server string, params *PartitionParams, contentType string, body io.Reader) (*http.Request, error)
NewPartitionRequestWithBody constructs an http.Request for the Partition method, with any body, and a specified content type
Types ¶
type CSVElement ¶
type CSVElement = string
CSVElement Example: type,element_id,text,languages,page_number,filename,filetype,parent_id,links
Title,b7f58c2fd9c15949a55a62eb84e39575,LayoutParser: A Unified Toolkit for Deep Learning Based Document Image Analysis,['eng'],1,layout-parser-paper.pdf,application/pdf,,
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) PartitionWithBody ¶
func (c *Client) PartitionWithBody(ctx context.Context, params *PartitionParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
PartitionWithBody Summary
Description.
Takes any type of body and a specified content type.
Corresponds with POST /general/v0/general (the `Partition` operationId).
type ClientInterface ¶
type ClientInterface interface {
// PartitionWithBody Summary
//
// Description.
//
// Takes any type of body and a specified content type.
//
// Corresponds with POST /general/v0/general (the `Partition` operationId).
PartitionWithBody(ctx context.Context, params *PartitionParams, contentType string, body io.Reader, 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) PartitionWithBodyWithResponse ¶
func (c *ClientWithResponses) PartitionWithBodyWithResponse(ctx context.Context, params *PartitionParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PartitionResponse, error)
PartitionWithBodyWithResponse Summary
Description.
Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
Corresponds with POST /general/v0/general (the `Partition` operationId).
type ClientWithResponsesInterface ¶
type ClientWithResponsesInterface interface {
// PartitionWithBodyWithResponse Summary
//
// Description.
//
// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /general/v0/general (the `Partition` operationId).
PartitionWithBodyWithResponse(ctx context.Context, params *PartitionParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PartitionResponse, error)
}
ClientWithResponsesInterface is the interface specification for the client with responses above.
type Element ¶
type Element map[string]json.RawMessage
Element Example: {"element_id":"6aa0ff22f91bbe7e26e8e25ca8052acd","metadata":{"filename":"layout-parser-paper.pdf","filetype":"application/pdf","languages":["eng"],"page_number":1},"text":"LayoutParser: A Unified Toolkit for Deep Learning Based Document Image Analysis","type":"Title"}
type HTTPValidationError ¶
type HTTPValidationError struct {
Detail *HTTPValidationError_Detail `json:"detail,omitempty"`
}
HTTPValidationError Example: {"detail":[{"input":"forty","loc":["body","combine_under_n_chars"],"msg":"Input should be a valid integer, unable to parse string as an integer","type":"int_parsing"}]}
type HTTPValidationErrorDetail0 ¶
type HTTPValidationErrorDetail0 = []ValidationError
HTTPValidationErrorDetail0 defines model for HTTPValidationError.Detail.0.
type HTTPValidationErrorDetail1 ¶
type HTTPValidationErrorDetail1 = string
HTTPValidationErrorDetail1 defines model for HTTPValidationError.Detail.1.
type HTTPValidationError_Detail ¶
type HTTPValidationError_Detail struct {
// contains filtered or unexported fields
}
HTTPValidationError_Detail defines model for HTTPValidationError.Detail.
func (HTTPValidationError_Detail) AsHTTPValidationErrorDetail0 ¶
func (t HTTPValidationError_Detail) AsHTTPValidationErrorDetail0() (HTTPValidationErrorDetail0, error)
AsHTTPValidationErrorDetail0 returns the union data inside the HTTPValidationError_Detail as a HTTPValidationErrorDetail0
func (HTTPValidationError_Detail) AsHTTPValidationErrorDetail1 ¶
func (t HTTPValidationError_Detail) AsHTTPValidationErrorDetail1() (HTTPValidationErrorDetail1, error)
AsHTTPValidationErrorDetail1 returns the union data inside the HTTPValidationError_Detail as a HTTPValidationErrorDetail1
func (*HTTPValidationError_Detail) FromHTTPValidationErrorDetail0 ¶
func (t *HTTPValidationError_Detail) FromHTTPValidationErrorDetail0(v HTTPValidationErrorDetail0) error
FromHTTPValidationErrorDetail0 overwrites any union data inside the HTTPValidationError_Detail as the provided HTTPValidationErrorDetail0
func (*HTTPValidationError_Detail) FromHTTPValidationErrorDetail1 ¶
func (t *HTTPValidationError_Detail) FromHTTPValidationErrorDetail1(v HTTPValidationErrorDetail1) error
FromHTTPValidationErrorDetail1 overwrites any union data inside the HTTPValidationError_Detail as the provided HTTPValidationErrorDetail1
func (HTTPValidationError_Detail) MarshalJSON ¶
func (t HTTPValidationError_Detail) MarshalJSON() ([]byte, error)
func (*HTTPValidationError_Detail) MergeHTTPValidationErrorDetail0 ¶
func (t *HTTPValidationError_Detail) MergeHTTPValidationErrorDetail0(v HTTPValidationErrorDetail0) error
MergeHTTPValidationErrorDetail0 performs a merge with any union data inside the HTTPValidationError_Detail, using the provided HTTPValidationErrorDetail0
func (*HTTPValidationError_Detail) MergeHTTPValidationErrorDetail1 ¶
func (t *HTTPValidationError_Detail) MergeHTTPValidationErrorDetail1(v HTTPValidationErrorDetail1) error
MergeHTTPValidationErrorDetail1 performs a merge with any union data inside the HTTPValidationError_Detail, using the provided HTTPValidationErrorDetail1
func (*HTTPValidationError_Detail) UnmarshalJSON ¶
func (t *HTTPValidationError_Detail) UnmarshalJSON(b []byte) error
type HttpRequestDoer ¶
Doer performs HTTP requests.
The standard http.Client implements this interface.
type PartitionMultipartRequestBody ¶
type PartitionMultipartRequestBody = PartitionParameters
PartitionMultipartRequestBody defines body for Partition for multipart/form-data ContentType.
type PartitionParameters ¶
type PartitionParameters struct {
// ChunkingStrategy Use one of the supported strategies to chunk the returned elements after partitioning. When 'chunking_strategy' is not specified, no chunking is performed and any other chunking parameters provided are ignored. Supported strategies: 'basic', 'by_page', 'by_similarity', or 'by_title'
//
// Example: by_title
ChunkingStrategy *string `json:"chunking_strategy,omitempty"`
// CombineUnderNChars If chunking strategy is set, combine elements until a section reaches a length of n chars. Default: 500
CombineUnderNChars *int `json:"combine_under_n_chars,omitempty"`
// ContentType A hint about the content type to use (such as text/markdown), when there are problems processing a specific file. This value is a MIME type in the format type/subtype.
ContentType *string `json:"content_type,omitempty"`
// ContextualChunkingAuth JSON-encoded auth credentials for the contextual chunking provider. Structure depends on the provider.
ContextualChunkingAuth *string `json:"contextual_chunking_auth,omitempty"`
// ContextualChunkingServiceName Pre-resolved prompt service name for contextual chunking (e.g. 'BedrockContextualChunking'). When set, uses this service with the provided auth instead of the default env-var-based model selection.
ContextualChunkingServiceName *string `json:"contextual_chunking_service_name,omitempty"`
// Coordinates If `True`, return coordinates for each element extracted via OCR. Default: `False`
Coordinates *bool `json:"coordinates,omitempty"`
DoNotBreakSimilarityOnFooterHeader *bool `json:"do_not_break_similarity_on_footer_header,omitempty"`
// Encoding The encoding method used to decode the text input. Default: utf-8
Encoding *string `json:"encoding,omitempty"`
// ExtractImageBlockTypes The types of elements to extract, for use in extracting image blocks as base64 encoded data stored in metadata fields.
ExtractImageBlockTypes *[]string `json:"extract_image_block_types,omitempty"`
// Files The file to extract
//
// Example: {"externalValue":"https://github.com/Unstructured-IO/unstructured/blob/98d3541909f64290b5efb65a226fc3ee8a7cc5ee/example-docs/layout-parser-paper.pdf","summary":"File to be partitioned"}
Files openapi_types.File `json:"files"`
// GzUncompressedContentType If file is gzipped, use this content type after unzipping.
GzUncompressedContentType *string `json:"gz_uncompressed_content_type,omitempty"`
// HiResModelName The inference model used for hi_res. Default: layout_large_1.1.0 unless overridden by deployment configuration. YOLOX and layout_v1.x models are deprecated and run layout_large_1.1.0 instead; substitutions are reported in the X-Unstructured-Warnings response header.
//
// Example: layout_large_1.1.0
HiResModelName *string `json:"hi_res_model_name,omitempty"`
// IncludeOrigElements When a chunking strategy is specified, each returned chunk will include the elements consolidated to form that chunk as `.metadata.orig_elements`. Default: true.
IncludeOrigElements *bool `json:"include_orig_elements,omitempty"`
// IncludePageBreaks If true, the output will include page breaks if the filetype supports it. Default: false
IncludePageBreaks *bool `json:"include_page_breaks,omitempty"`
// IncludeSlideNotes When `True`, slide notes from .ppt and .pptx files will be included in the response. Default: `True`
IncludeSlideNotes *bool `json:"include_slide_notes,omitempty"`
// IsolateTable When `True`, tables are never chunked together with other elements. Default: True
IsolateTable *bool `json:"isolate_table,omitempty"`
// Languages The languages present in the document, for use in partitioning and/or OCR. See the Tesseract documentation for a full list of languages.
Languages *[]string `json:"languages,omitempty"`
// MaxCharacters If chunking strategy is set, cut off new sections after reaching a length of n chars (hard max). Default: 500
MaxCharacters *int `json:"max_characters,omitempty"`
// MultipageSections If chunking strategy is set, determines if sections can span multiple sections. Default: true
MultipageSections *bool `json:"multipage_sections,omitempty"`
// NewAfterNChars If chunking strategy is set, cut off new sections after reaching a length of n chars (soft max). Default: 1500
NewAfterNChars *int `json:"new_after_n_chars,omitempty"`
// OcrLanguages Deprecated! The languages present in the document, for use in partitioning and/or OCR
OcrLanguages *[]string `json:"ocr_languages,omitempty"`
// OutputFormat The format of the response. Supported formats are application/json and text/csv. Default: application/json.
OutputFormat *PartitionParametersOutputFormat `json:"output_format,omitempty"`
// Overlap Specifies the length of a string ('tail') to be drawn from each chunk and prefixed to the next chunk as a context-preserving mechanism. By default, this only applies to split-chunks where an oversized element is divided into multiple chunks by text-splitting. Must be >= 0 and less than max_characters. Default: 0
Overlap *int `json:"overlap,omitempty"`
// OverlapAll When `True`, apply overlap between 'normal' chunks formed from whole elements and not subject to text-splitting. Use this with caution as it entails a certain level of 'pollution' of otherwise clean semantic chunk boundaries. Default: False
OverlapAll *bool `json:"overlap_all,omitempty"`
// PdfInferTableStructure Deprecated! Use skip_infer_table_types to opt out of table extraction for any file type. If False and strategy=hi_res, no Table Elements will be extracted from pdf files regardless of skip_infer_table_types contents.
PdfInferTableStructure *bool `json:"pdf_infer_table_structure,omitempty"`
// PdfminerCharMargin If two characters are closer together than this margin they are considered part of the same line. The margin is specified relative to the width of the character.
PdfminerCharMargin *float64 `json:"pdfminer_char_margin,omitempty"`
// PdfminerLineMargin If two lines are close together they are considered to be part of the same paragraph. The margin is specified relative to the height of a line.
PdfminerLineMargin *float64 `json:"pdfminer_line_margin,omitempty"`
// PdfminerLineOverlap If two characters have more overlap than this they are considered to be on the same line. The overlap is specified relative to the minimum height of both characters.
PdfminerLineOverlap *float64 `json:"pdfminer_line_overlap,omitempty"`
// PdfminerWordMargin If two characters on the same line are further apart than this margin then they are considered to be two separate words, and an intermediate space will be added for readability. The margin is specified relative to the width of the character.
PdfminerWordMargin *float64 `json:"pdfminer_word_margin,omitempty"`
// SimilarityThreshold A value between 0.0 and 1.0 describing the minimum similarity two elements must have to be included in the same chunk. Note that similar elements may be separated to meet chunk-size criteria; this value can only guarantees that two elements with similarity below the threshold will appear in separate chunks.
SimilarityThreshold *float64 `json:"similarity_threshold,omitempty"`
// SkipInferTableTypes The document types that you want to skip table extraction with. Default: []
SkipInferTableTypes *[]string `json:"skip_infer_table_types,omitempty"`
// SkipTableChunking When `True`, tables are not chunked and always kept unchanged. Default: False
SkipTableChunking *bool `json:"skip_table_chunking,omitempty"`
// StartingPageNumber When PDF is split into pages before sending it into the API, providing this information will allow the page number to be assigned correctly. Introduced in 1.0.27.
StartingPageNumber *int `json:"starting_page_number,omitempty"`
// Strategy The strategy to use for partitioning PDF/image. Options are fast, hi_res, auto. Default: hi_res
//
// Example: auto
Strategy *PartitionParametersStrategy `json:"strategy,omitempty"`
// TableOcrAgent The OCR agent to use for table ocr inference.
TableOcrAgent *string `json:"table_ocr_agent,omitempty"`
// TrackingEnabled Tracking enabled
TrackingEnabled *bool `json:"tracking_enabled,omitempty"`
// UniqueElementIds When `True`, assign UUIDs to element IDs, which guarantees their uniqueness (useful when using them as primary keys in database). Otherwise a SHA-256 of element text is used. Default: `False`
UniqueElementIds *bool `json:"unique_element_ids,omitempty"`
// VlmModel The VLM Model to use.
//
// Example: gpt-4o
VlmModel *string `json:"vlm_model,omitempty"`
// VlmModelProvider The VLM Model provider to use.
//
// Example: openai
VlmModelProvider *PartitionParametersVlmModelProvider `json:"vlm_model_provider,omitempty"`
// XmlKeepTags If `True`, will retain the XML tags in the output. Otherwise it will simply extract the text from within the tags. Only applies to XML documents.
XmlKeepTags *bool `json:"xml_keep_tags,omitempty"`
}
PartitionParameters defines model for partition_parameters.
type PartitionParametersOutputFormat ¶
type PartitionParametersOutputFormat string
PartitionParametersOutputFormat The format of the response. Supported formats are application/json and text/csv. Default: application/json.
const ( PartitionParametersOutputFormatApplicationjson PartitionParametersOutputFormat = "application/json" PartitionParametersOutputFormatTextcsv PartitionParametersOutputFormat = "text/csv" )
Defines values for PartitionParametersOutputFormat.
func (PartitionParametersOutputFormat) Valid ¶
func (e PartitionParametersOutputFormat) Valid() bool
Valid indicates whether the value is a known member of the PartitionParametersOutputFormat enum.
type PartitionParametersStrategy ¶
type PartitionParametersStrategy string
PartitionParametersStrategy The strategy to use for partitioning PDF/image. Options are fast, hi_res, auto. Default: hi_res
Example: auto
const ( PartitionParametersStrategyAuto PartitionParametersStrategy = "auto" PartitionParametersStrategyFast PartitionParametersStrategy = "fast" PartitionParametersStrategyHiRes PartitionParametersStrategy = "hi_res" PartitionParametersStrategyOcrOnly PartitionParametersStrategy = "ocr_only" PartitionParametersStrategyOdOnly PartitionParametersStrategy = "od_only" PartitionParametersStrategyVlm PartitionParametersStrategy = "vlm" )
Defines values for PartitionParametersStrategy.
func (PartitionParametersStrategy) Valid ¶
func (e PartitionParametersStrategy) Valid() bool
Valid indicates whether the value is a known member of the PartitionParametersStrategy enum.
type PartitionParametersVlmModelProvider ¶
type PartitionParametersVlmModelProvider string
PartitionParametersVlmModelProvider The VLM Model provider to use.
Example: openai
const ( PartitionParametersVlmModelProviderAnthropic PartitionParametersVlmModelProvider = "anthropic" PartitionParametersVlmModelProviderAnthropicBedrock PartitionParametersVlmModelProvider = "anthropic_bedrock" PartitionParametersVlmModelProviderAzureOpenai PartitionParametersVlmModelProvider = "azure_openai" PartitionParametersVlmModelProviderBedrock PartitionParametersVlmModelProvider = "bedrock" PartitionParametersVlmModelProviderGoogle PartitionParametersVlmModelProvider = "google" PartitionParametersVlmModelProviderOpenai PartitionParametersVlmModelProvider = "openai" PartitionParametersVlmModelProviderVertexai PartitionParametersVlmModelProvider = "vertexai" )
Defines values for PartitionParametersVlmModelProvider.
func (PartitionParametersVlmModelProvider) Valid ¶
func (e PartitionParametersVlmModelProvider) Valid() bool
Valid indicates whether the value is a known member of the PartitionParametersVlmModelProvider enum.
type PartitionParams ¶
type PartitionParams struct {
UnstructuredApiKey *string `json:"unstructured-api-key,omitempty"`
}
PartitionParams defines parameters for Partition.
type PartitionResponse ¶
type PartitionResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *[]Element
// JSON422 the response for an HTTP 422 `application/json` response
JSON422 *HTTPValidationError
// JSON5XX the response for an HTTP 5XX `application/json` response
JSON5XX *ServerError
// Headers200 the parsed response headers for an HTTP 200 response
Headers200 *PartitionResponse200Headers
}
func ParsePartitionResponse ¶
func ParsePartitionResponse(rsp *http.Response) (*PartitionResponse, error)
ParsePartitionResponse parses an HTTP response from a PartitionWithResponse call
func (PartitionResponse) ContentType ¶
func (r PartitionResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (PartitionResponse) GetBody ¶
func (r PartitionResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (PartitionResponse) GetJSON5XX ¶
func (r PartitionResponse) GetJSON5XX() *ServerError
GetJSON5XX returns the response for an HTTP 5XX `application/json` response
func (PartitionResponse) GetJSON200 ¶
func (r PartitionResponse) GetJSON200() *[]Element
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (PartitionResponse) GetJSON422 ¶
func (r PartitionResponse) GetJSON422() *HTTPValidationError
GetJSON422 returns the response for an HTTP 422 `application/json` response
func (PartitionResponse) Status ¶
func (r PartitionResponse) Status() string
Status returns HTTPResponse.Status
func (PartitionResponse) StatusCode ¶
func (r PartitionResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type PartitionResponse200Headers ¶ added in v0.3.4
type PartitionResponse200Headers struct {
XUnstructuredWarnings *string
}
PartitionResponse200Headers the declared response headers of an HTTP 200 response for Partition
type RequestEditorFn ¶
RequestEditorFn is the function signature for the RequestEditor callback function
type ServerError ¶
type ServerError struct {
Detail *string `json:"detail,omitempty"`
}
ServerError Example: {"detail":"An error occurred"}
type ValidationError ¶
type ValidationError struct {
Ctx *map[string]interface{} `json:"ctx,omitempty"`
Input interface{} `json:"input,omitempty"`
Loc []ValidationError_Loc_Item `json:"loc"`
Msg string `json:"msg"`
Type string `json:"type"`
}
ValidationError defines model for ValidationError.
type ValidationErrorLoc0 ¶
type ValidationErrorLoc0 = string
ValidationErrorLoc0 defines model for ValidationError.Loc.0.
type ValidationErrorLoc1 ¶
type ValidationErrorLoc1 = int
ValidationErrorLoc1 defines model for ValidationError.Loc.1.
type ValidationError_Loc_Item ¶
type ValidationError_Loc_Item struct {
// contains filtered or unexported fields
}
ValidationError_Loc_Item defines model for ValidationError.loc.Item.
func (ValidationError_Loc_Item) AsValidationErrorLoc0 ¶
func (t ValidationError_Loc_Item) AsValidationErrorLoc0() (ValidationErrorLoc0, error)
AsValidationErrorLoc0 returns the union data inside the ValidationError_Loc_Item as a ValidationErrorLoc0
func (ValidationError_Loc_Item) AsValidationErrorLoc1 ¶
func (t ValidationError_Loc_Item) AsValidationErrorLoc1() (ValidationErrorLoc1, error)
AsValidationErrorLoc1 returns the union data inside the ValidationError_Loc_Item as a ValidationErrorLoc1
func (*ValidationError_Loc_Item) FromValidationErrorLoc0 ¶
func (t *ValidationError_Loc_Item) FromValidationErrorLoc0(v ValidationErrorLoc0) error
FromValidationErrorLoc0 overwrites any union data inside the ValidationError_Loc_Item as the provided ValidationErrorLoc0
func (*ValidationError_Loc_Item) FromValidationErrorLoc1 ¶
func (t *ValidationError_Loc_Item) FromValidationErrorLoc1(v ValidationErrorLoc1) error
FromValidationErrorLoc1 overwrites any union data inside the ValidationError_Loc_Item as the provided ValidationErrorLoc1
func (ValidationError_Loc_Item) MarshalJSON ¶
func (t ValidationError_Loc_Item) MarshalJSON() ([]byte, error)
func (*ValidationError_Loc_Item) MergeValidationErrorLoc0 ¶
func (t *ValidationError_Loc_Item) MergeValidationErrorLoc0(v ValidationErrorLoc0) error
MergeValidationErrorLoc0 performs a merge with any union data inside the ValidationError_Loc_Item, using the provided ValidationErrorLoc0
func (*ValidationError_Loc_Item) MergeValidationErrorLoc1 ¶
func (t *ValidationError_Loc_Item) MergeValidationErrorLoc1(v ValidationErrorLoc1) error
MergeValidationErrorLoc1 performs a merge with any union data inside the ValidationError_Loc_Item, using the provided ValidationErrorLoc1
func (*ValidationError_Loc_Item) UnmarshalJSON ¶
func (t *ValidationError_Loc_Item) UnmarshalJSON(b []byte) error