Documentation
¶
Overview ¶
Package control provides primitives to interact with the openapi HTTP API.
Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.3.0 DO NOT EDIT.
Index ¶
- Constants
- func NewConfigureIndexRequest(server string, indexName string, body ConfigureIndexJSONRequestBody) (*http.Request, error)
- func NewConfigureIndexRequestWithBody(server string, indexName string, contentType string, body io.Reader) (*http.Request, error)
- func NewCreateCollectionRequest(server string, body CreateCollectionJSONRequestBody) (*http.Request, error)
- func NewCreateCollectionRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewCreateIndexRequest(server string, body CreateIndexJSONRequestBody) (*http.Request, error)
- func NewCreateIndexRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewDeleteCollectionRequest(server string, collectionName string) (*http.Request, error)
- func NewDeleteIndexRequest(server string, indexName string) (*http.Request, error)
- func NewDescribeCollectionRequest(server string, collectionName string) (*http.Request, error)
- func NewDescribeIndexRequest(server string, indexName string) (*http.Request, error)
- func NewEmbedRequest(server string, body EmbedJSONRequestBody) (*http.Request, error)
- func NewEmbedRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewListCollectionsRequest(server string) (*http.Request, error)
- func NewListIndexesRequest(server string) (*http.Request, error)
- type Client
- func (c *Client) ConfigureIndex(ctx context.Context, indexName string, body ConfigureIndexJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) ConfigureIndexWithBody(ctx context.Context, indexName string, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) CreateCollection(ctx context.Context, body CreateCollectionJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) CreateCollectionWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) CreateIndex(ctx context.Context, body CreateIndexJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) CreateIndexWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) DeleteCollection(ctx context.Context, collectionName string, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) DeleteIndex(ctx context.Context, indexName string, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) DescribeCollection(ctx context.Context, collectionName string, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) DescribeIndex(ctx context.Context, indexName string, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) Embed(ctx context.Context, body EmbedJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) EmbedWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) ListCollections(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) ListIndexes(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
- type ClientInterface
- type ClientOption
- type ClientWithResponses
- func (c *ClientWithResponses) ConfigureIndexWithBodyWithResponse(ctx context.Context, indexName string, contentType string, body io.Reader, ...) (*ConfigureIndexResponse, error)
- func (c *ClientWithResponses) ConfigureIndexWithResponse(ctx context.Context, indexName string, body ConfigureIndexJSONRequestBody, ...) (*ConfigureIndexResponse, error)
- func (c *ClientWithResponses) CreateCollectionWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*CreateCollectionResponse, error)
- func (c *ClientWithResponses) CreateCollectionWithResponse(ctx context.Context, body CreateCollectionJSONRequestBody, ...) (*CreateCollectionResponse, error)
- func (c *ClientWithResponses) CreateIndexWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*CreateIndexResponse, error)
- func (c *ClientWithResponses) CreateIndexWithResponse(ctx context.Context, body CreateIndexJSONRequestBody, ...) (*CreateIndexResponse, error)
- func (c *ClientWithResponses) DeleteCollectionWithResponse(ctx context.Context, collectionName string, reqEditors ...RequestEditorFn) (*DeleteCollectionResponse, error)
- func (c *ClientWithResponses) DeleteIndexWithResponse(ctx context.Context, indexName string, reqEditors ...RequestEditorFn) (*DeleteIndexResponse, error)
- func (c *ClientWithResponses) DescribeCollectionWithResponse(ctx context.Context, collectionName string, reqEditors ...RequestEditorFn) (*DescribeCollectionResponse, error)
- func (c *ClientWithResponses) DescribeIndexWithResponse(ctx context.Context, indexName string, reqEditors ...RequestEditorFn) (*DescribeIndexResponse, error)
- func (c *ClientWithResponses) EmbedWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*EmbedResponse, error)
- func (c *ClientWithResponses) EmbedWithResponse(ctx context.Context, body EmbedJSONRequestBody, reqEditors ...RequestEditorFn) (*EmbedResponse, error)
- func (c *ClientWithResponses) ListCollectionsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListCollectionsResponse, error)
- func (c *ClientWithResponses) ListIndexesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListIndexesResponse, error)
- type ClientWithResponsesInterface
- type CollectionList
- type CollectionModel
- type CollectionModelStatus
- type ConfigureIndexJSONRequestBody
- type ConfigureIndexRequest
- type ConfigureIndexResponse
- type CreateCollectionJSONRequestBody
- type CreateCollectionRequest
- type CreateCollectionResponse
- type CreateIndexJSONRequestBody
- type CreateIndexRequest
- type CreateIndexRequestMetric
- type CreateIndexResponse
- type DeleteCollectionResponse
- type DeleteIndexResponse
- type DeletionProtection
- type DescribeCollectionResponse
- type DescribeIndexResponse
- type EmbedJSONRequestBody
- type EmbedRequest
- type EmbedResponse
- type Embedding
- type EmbeddingsList
- type ErrorResponse
- type ErrorResponseErrorCode
- type HttpRequestDoer
- type IndexList
- type IndexModel
- type IndexModelMetric
- type IndexModelStatusState
- type IndexSpec
- func (t IndexSpec) AsIndexSpec0() (IndexSpec0, error)
- func (t IndexSpec) AsIndexSpec1() (IndexSpec1, error)
- func (t *IndexSpec) FromIndexSpec0(v IndexSpec0) error
- func (t *IndexSpec) FromIndexSpec1(v IndexSpec1) error
- func (t IndexSpec) MarshalJSON() ([]byte, error)
- func (t *IndexSpec) MergeIndexSpec0(v IndexSpec0) error
- func (t *IndexSpec) MergeIndexSpec1(v IndexSpec1) error
- func (t *IndexSpec) UnmarshalJSON(b []byte) error
- type IndexSpec0
- type IndexSpec1
- type ListCollectionsResponse
- type ListIndexesResponse
- type PodSpec
- type RequestEditorFn
- type ServerlessSpec
- type ServerlessSpecCloud
Constants ¶
const (
ApiKeyAuthScopes = "ApiKeyAuth.Scopes"
)
Variables ¶
This section is empty.
Functions ¶
func NewConfigureIndexRequest ¶
func NewConfigureIndexRequest(server string, indexName string, body ConfigureIndexJSONRequestBody) (*http.Request, error)
NewConfigureIndexRequest calls the generic ConfigureIndex builder with application/json body
func NewConfigureIndexRequestWithBody ¶
func NewConfigureIndexRequestWithBody(server string, indexName string, contentType string, body io.Reader) (*http.Request, error)
NewConfigureIndexRequestWithBody generates requests for ConfigureIndex with any type of body
func NewCreateCollectionRequest ¶
func NewCreateCollectionRequest(server string, body CreateCollectionJSONRequestBody) (*http.Request, error)
NewCreateCollectionRequest calls the generic CreateCollection builder with application/json body
func NewCreateCollectionRequestWithBody ¶
func NewCreateCollectionRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewCreateCollectionRequestWithBody generates requests for CreateCollection with any type of body
func NewCreateIndexRequest ¶
func NewCreateIndexRequest(server string, body CreateIndexJSONRequestBody) (*http.Request, error)
NewCreateIndexRequest calls the generic CreateIndex builder with application/json body
func NewCreateIndexRequestWithBody ¶
func NewCreateIndexRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewCreateIndexRequestWithBody generates requests for CreateIndex with any type of body
func NewDeleteCollectionRequest ¶
NewDeleteCollectionRequest generates requests for DeleteCollection
func NewDeleteIndexRequest ¶
NewDeleteIndexRequest generates requests for DeleteIndex
func NewDescribeCollectionRequest ¶
NewDescribeCollectionRequest generates requests for DescribeCollection
func NewDescribeIndexRequest ¶
NewDescribeIndexRequest generates requests for DescribeIndex
func NewEmbedRequest ¶ added in v1.0.0
func NewEmbedRequest(server string, body EmbedJSONRequestBody) (*http.Request, error)
NewEmbedRequest calls the generic Embed builder with application/json body
func NewEmbedRequestWithBody ¶ added in v1.0.0
func NewEmbedRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewEmbedRequestWithBody generates requests for Embed with any type of body
func NewListCollectionsRequest ¶
NewListCollectionsRequest generates requests for ListCollections
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) ConfigureIndex ¶
func (c *Client) ConfigureIndex(ctx context.Context, indexName string, body ConfigureIndexJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) ConfigureIndexWithBody ¶
func (*Client) CreateCollection ¶
func (c *Client) CreateCollection(ctx context.Context, body CreateCollectionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) CreateCollectionWithBody ¶
func (*Client) CreateIndex ¶
func (c *Client) CreateIndex(ctx context.Context, body CreateIndexJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) CreateIndexWithBody ¶
func (*Client) DeleteCollection ¶
func (*Client) DeleteIndex ¶
func (*Client) DescribeCollection ¶
func (*Client) DescribeIndex ¶
func (*Client) Embed ¶ added in v1.0.0
func (c *Client) Embed(ctx context.Context, body EmbedJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) EmbedWithBody ¶ added in v1.0.0
func (*Client) ListCollections ¶
func (*Client) ListIndexes ¶
type ClientInterface ¶
type ClientInterface interface {
// ListCollections request
ListCollections(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
// CreateCollectionWithBody request with any body
CreateCollectionWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
CreateCollection(ctx context.Context, body CreateCollectionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// DeleteCollection request
DeleteCollection(ctx context.Context, collectionName string, reqEditors ...RequestEditorFn) (*http.Response, error)
// DescribeCollection request
DescribeCollection(ctx context.Context, collectionName string, reqEditors ...RequestEditorFn) (*http.Response, error)
// EmbedWithBody request with any body
EmbedWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
Embed(ctx context.Context, body EmbedJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// ListIndexes request
ListIndexes(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
// CreateIndexWithBody request with any body
CreateIndexWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
CreateIndex(ctx context.Context, body CreateIndexJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// DeleteIndex request
DeleteIndex(ctx context.Context, indexName string, reqEditors ...RequestEditorFn) (*http.Response, error)
// DescribeIndex request
DescribeIndex(ctx context.Context, indexName string, reqEditors ...RequestEditorFn) (*http.Response, error)
// ConfigureIndexWithBody request with any body
ConfigureIndexWithBody(ctx context.Context, indexName string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
ConfigureIndex(ctx context.Context, indexName string, body ConfigureIndexJSONRequestBody, 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) ConfigureIndexWithBodyWithResponse ¶
func (c *ClientWithResponses) ConfigureIndexWithBodyWithResponse(ctx context.Context, indexName string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ConfigureIndexResponse, error)
ConfigureIndexWithBodyWithResponse request with arbitrary body returning *ConfigureIndexResponse
func (*ClientWithResponses) ConfigureIndexWithResponse ¶
func (c *ClientWithResponses) ConfigureIndexWithResponse(ctx context.Context, indexName string, body ConfigureIndexJSONRequestBody, reqEditors ...RequestEditorFn) (*ConfigureIndexResponse, error)
func (*ClientWithResponses) CreateCollectionWithBodyWithResponse ¶
func (c *ClientWithResponses) CreateCollectionWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateCollectionResponse, error)
CreateCollectionWithBodyWithResponse request with arbitrary body returning *CreateCollectionResponse
func (*ClientWithResponses) CreateCollectionWithResponse ¶
func (c *ClientWithResponses) CreateCollectionWithResponse(ctx context.Context, body CreateCollectionJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateCollectionResponse, error)
func (*ClientWithResponses) CreateIndexWithBodyWithResponse ¶
func (c *ClientWithResponses) CreateIndexWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateIndexResponse, error)
CreateIndexWithBodyWithResponse request with arbitrary body returning *CreateIndexResponse
func (*ClientWithResponses) CreateIndexWithResponse ¶
func (c *ClientWithResponses) CreateIndexWithResponse(ctx context.Context, body CreateIndexJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateIndexResponse, error)
func (*ClientWithResponses) DeleteCollectionWithResponse ¶
func (c *ClientWithResponses) DeleteCollectionWithResponse(ctx context.Context, collectionName string, reqEditors ...RequestEditorFn) (*DeleteCollectionResponse, error)
DeleteCollectionWithResponse request returning *DeleteCollectionResponse
func (*ClientWithResponses) DeleteIndexWithResponse ¶
func (c *ClientWithResponses) DeleteIndexWithResponse(ctx context.Context, indexName string, reqEditors ...RequestEditorFn) (*DeleteIndexResponse, error)
DeleteIndexWithResponse request returning *DeleteIndexResponse
func (*ClientWithResponses) DescribeCollectionWithResponse ¶
func (c *ClientWithResponses) DescribeCollectionWithResponse(ctx context.Context, collectionName string, reqEditors ...RequestEditorFn) (*DescribeCollectionResponse, error)
DescribeCollectionWithResponse request returning *DescribeCollectionResponse
func (*ClientWithResponses) DescribeIndexWithResponse ¶
func (c *ClientWithResponses) DescribeIndexWithResponse(ctx context.Context, indexName string, reqEditors ...RequestEditorFn) (*DescribeIndexResponse, error)
DescribeIndexWithResponse request returning *DescribeIndexResponse
func (*ClientWithResponses) EmbedWithBodyWithResponse ¶ added in v1.0.0
func (c *ClientWithResponses) EmbedWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*EmbedResponse, error)
EmbedWithBodyWithResponse request with arbitrary body returning *EmbedResponse
func (*ClientWithResponses) EmbedWithResponse ¶ added in v1.0.0
func (c *ClientWithResponses) EmbedWithResponse(ctx context.Context, body EmbedJSONRequestBody, reqEditors ...RequestEditorFn) (*EmbedResponse, error)
func (*ClientWithResponses) ListCollectionsWithResponse ¶
func (c *ClientWithResponses) ListCollectionsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListCollectionsResponse, error)
ListCollectionsWithResponse request returning *ListCollectionsResponse
func (*ClientWithResponses) ListIndexesWithResponse ¶
func (c *ClientWithResponses) ListIndexesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListIndexesResponse, error)
ListIndexesWithResponse request returning *ListIndexesResponse
type ClientWithResponsesInterface ¶
type ClientWithResponsesInterface interface {
// ListCollectionsWithResponse request
ListCollectionsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListCollectionsResponse, error)
// CreateCollectionWithBodyWithResponse request with any body
CreateCollectionWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateCollectionResponse, error)
CreateCollectionWithResponse(ctx context.Context, body CreateCollectionJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateCollectionResponse, error)
// DeleteCollectionWithResponse request
DeleteCollectionWithResponse(ctx context.Context, collectionName string, reqEditors ...RequestEditorFn) (*DeleteCollectionResponse, error)
// DescribeCollectionWithResponse request
DescribeCollectionWithResponse(ctx context.Context, collectionName string, reqEditors ...RequestEditorFn) (*DescribeCollectionResponse, error)
// EmbedWithBodyWithResponse request with any body
EmbedWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*EmbedResponse, error)
EmbedWithResponse(ctx context.Context, body EmbedJSONRequestBody, reqEditors ...RequestEditorFn) (*EmbedResponse, error)
// ListIndexesWithResponse request
ListIndexesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListIndexesResponse, error)
// CreateIndexWithBodyWithResponse request with any body
CreateIndexWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateIndexResponse, error)
CreateIndexWithResponse(ctx context.Context, body CreateIndexJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateIndexResponse, error)
// DeleteIndexWithResponse request
DeleteIndexWithResponse(ctx context.Context, indexName string, reqEditors ...RequestEditorFn) (*DeleteIndexResponse, error)
// DescribeIndexWithResponse request
DescribeIndexWithResponse(ctx context.Context, indexName string, reqEditors ...RequestEditorFn) (*DescribeIndexResponse, error)
// ConfigureIndexWithBodyWithResponse request with any body
ConfigureIndexWithBodyWithResponse(ctx context.Context, indexName string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ConfigureIndexResponse, error)
ConfigureIndexWithResponse(ctx context.Context, indexName string, body ConfigureIndexJSONRequestBody, reqEditors ...RequestEditorFn) (*ConfigureIndexResponse, error)
}
ClientWithResponsesInterface is the interface specification for the client with responses above.
type CollectionList ¶
type CollectionList struct {
Collections *[]CollectionModel `json:"collections,omitempty"`
}
CollectionList The list of collections that exist in the project.
type CollectionModel ¶
type CollectionModel struct {
// Dimension The dimension of the vectors stored in each record held in the collection.
Dimension *int32 `json:"dimension,omitempty"`
// Environment The environment where the collection is hosted.
Environment string `json:"environment"`
// Name The name of the collection.
Name string `json:"name"`
// Size The size of the collection in bytes.
Size *int64 `json:"size,omitempty"`
// Status The status of the collection.
Status CollectionModelStatus `json:"status"`
// VectorCount The number of records stored in the collection.
VectorCount *int32 `json:"vector_count,omitempty"`
}
CollectionModel The CollectionModel describes the configuration and status of a Pinecone collection.
type CollectionModelStatus ¶
type CollectionModelStatus string
CollectionModelStatus The status of the collection.
const ( CollectionModelStatusInitializing CollectionModelStatus = "Initializing" CollectionModelStatusReady CollectionModelStatus = "Ready" CollectionModelStatusTerminating CollectionModelStatus = "Terminating" )
Defines values for CollectionModelStatus.
type ConfigureIndexJSONRequestBody ¶
type ConfigureIndexJSONRequestBody = ConfigureIndexRequest
ConfigureIndexJSONRequestBody defines body for ConfigureIndex for application/json ContentType.
type ConfigureIndexRequest ¶
type ConfigureIndexRequest struct {
// DeletionProtection Whether [deletion protection](http://docs.pinecone.io/guides/indexes/prevent-index-deletion) is enabled/disabled for the index.
DeletionProtection *DeletionProtection `json:"deletion_protection,omitempty"`
Spec *struct {
Pod struct {
// PodType The type of pod to use. One of `s1`, `p1`, or `p2` appended with `.` and one of `x1`, `x2`, `x4`, or `x8`.
PodType *string `json:"pod_type,omitempty"`
// Replicas The number of replicas. Replicas duplicate your index. They provide higher availability and throughput. Replicas can be scaled up or down as your needs change.
Replicas *int32 `json:"replicas,omitempty"`
} `json:"pod"`
} `json:"spec,omitempty"`
}
ConfigureIndexRequest Configuration used to scale an index.
type ConfigureIndexResponse ¶
type ConfigureIndexResponse struct {
Body []byte
HTTPResponse *http.Response
JSON202 *IndexModel
JSON400 *ErrorResponse
JSON401 *ErrorResponse
JSON403 *ErrorResponse
JSON404 *ErrorResponse
JSON422 *ErrorResponse
JSON500 *ErrorResponse
}
func ParseConfigureIndexResponse ¶
func ParseConfigureIndexResponse(rsp *http.Response) (*ConfigureIndexResponse, error)
ParseConfigureIndexResponse parses an HTTP response from a ConfigureIndexWithResponse call
func (ConfigureIndexResponse) Status ¶
func (r ConfigureIndexResponse) Status() string
Status returns HTTPResponse.Status
func (ConfigureIndexResponse) StatusCode ¶
func (r ConfigureIndexResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type CreateCollectionJSONRequestBody ¶
type CreateCollectionJSONRequestBody = CreateCollectionRequest
CreateCollectionJSONRequestBody defines body for CreateCollection for application/json ContentType.
type CreateCollectionRequest ¶
type CreateCollectionRequest struct {
// Name The name of the collection to be created. Resource name must be 1-45 characters long, start and end with an alphanumeric character, and consist only of lower case alphanumeric characters or '-'.
Name string `json:"name"`
// Source The name of the index to be used as the source for the collection.
Source string `json:"source"`
}
CreateCollectionRequest The configuration needed to create a Pinecone collection.
type CreateCollectionResponse ¶
type CreateCollectionResponse struct {
Body []byte
HTTPResponse *http.Response
JSON201 *CollectionModel
JSON400 *ErrorResponse
JSON401 *ErrorResponse
JSON403 *ErrorResponse
JSON409 *ErrorResponse
JSON422 *ErrorResponse
JSON500 *ErrorResponse
}
func ParseCreateCollectionResponse ¶
func ParseCreateCollectionResponse(rsp *http.Response) (*CreateCollectionResponse, error)
ParseCreateCollectionResponse parses an HTTP response from a CreateCollectionWithResponse call
func (CreateCollectionResponse) Status ¶
func (r CreateCollectionResponse) Status() string
Status returns HTTPResponse.Status
func (CreateCollectionResponse) StatusCode ¶
func (r CreateCollectionResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type CreateIndexJSONRequestBody ¶
type CreateIndexJSONRequestBody = CreateIndexRequest
CreateIndexJSONRequestBody defines body for CreateIndex for application/json ContentType.
type CreateIndexRequest ¶
type CreateIndexRequest struct {
// DeletionProtection Whether [deletion protection](http://docs.pinecone.io/guides/indexes/prevent-index-deletion) is enabled/disabled for the index.
DeletionProtection *DeletionProtection `json:"deletion_protection,omitempty"`
// Dimension The dimensions of the vectors to be inserted in the index.
Dimension int32 `json:"dimension"`
// Metric The distance metric to be used for similarity search. You can use 'euclidean', 'cosine', or 'dotproduct'.
Metric *CreateIndexRequestMetric `json:"metric,omitempty"`
// Name The name of the index. Resource name must be 1-45 characters long, start and end with an alphanumeric character, and consist only of lower case alphanumeric characters or '-'.
Name string `json:"name"`
// Spec The spec object defines how the index should be deployed.
//
// For serverless indexes, you define only the [cloud and region](http://docs.pinecone.io/guides/indexes/understanding-indexes#cloud-regions) where the index should be hosted. For pod-based indexes, you define the [environment](http://docs.pinecone.io/guides/indexes/understanding-indexes#pod-environments) where the index should be hosted, the [pod type and size](http://docs.pinecone.io/guides/indexes/understanding-indexes#pod-types) to use, and other index characteristics.
Spec IndexSpec `json:"spec"`
}
CreateIndexRequest The configuration needed to create a Pinecone index.
type CreateIndexRequestMetric ¶ added in v1.0.0
type CreateIndexRequestMetric string
CreateIndexRequestMetric The distance metric to be used for similarity search. You can use 'euclidean', 'cosine', or 'dotproduct'.
const ( CreateIndexRequestMetricCosine CreateIndexRequestMetric = "cosine" CreateIndexRequestMetricDotproduct CreateIndexRequestMetric = "dotproduct" CreateIndexRequestMetricEuclidean CreateIndexRequestMetric = "euclidean" )
Defines values for CreateIndexRequestMetric.
type CreateIndexResponse ¶
type CreateIndexResponse struct {
Body []byte
HTTPResponse *http.Response
JSON201 *IndexModel
JSON400 *ErrorResponse
JSON401 *ErrorResponse
JSON403 *ErrorResponse
JSON404 *ErrorResponse
JSON409 *ErrorResponse
JSON422 *ErrorResponse
JSON500 *ErrorResponse
}
func ParseCreateIndexResponse ¶
func ParseCreateIndexResponse(rsp *http.Response) (*CreateIndexResponse, error)
ParseCreateIndexResponse parses an HTTP response from a CreateIndexWithResponse call
func (CreateIndexResponse) Status ¶
func (r CreateIndexResponse) Status() string
Status returns HTTPResponse.Status
func (CreateIndexResponse) StatusCode ¶
func (r CreateIndexResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type DeleteCollectionResponse ¶
type DeleteCollectionResponse struct {
Body []byte
HTTPResponse *http.Response
JSON401 *ErrorResponse
JSON404 *ErrorResponse
JSON500 *ErrorResponse
}
func ParseDeleteCollectionResponse ¶
func ParseDeleteCollectionResponse(rsp *http.Response) (*DeleteCollectionResponse, error)
ParseDeleteCollectionResponse parses an HTTP response from a DeleteCollectionWithResponse call
func (DeleteCollectionResponse) Status ¶
func (r DeleteCollectionResponse) Status() string
Status returns HTTPResponse.Status
func (DeleteCollectionResponse) StatusCode ¶
func (r DeleteCollectionResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type DeleteIndexResponse ¶
type DeleteIndexResponse struct {
Body []byte
HTTPResponse *http.Response
JSON401 *ErrorResponse
JSON404 *ErrorResponse
JSON412 *ErrorResponse
JSON500 *ErrorResponse
}
func ParseDeleteIndexResponse ¶
func ParseDeleteIndexResponse(rsp *http.Response) (*DeleteIndexResponse, error)
ParseDeleteIndexResponse parses an HTTP response from a DeleteIndexWithResponse call
func (DeleteIndexResponse) Status ¶
func (r DeleteIndexResponse) Status() string
Status returns HTTPResponse.Status
func (DeleteIndexResponse) StatusCode ¶
func (r DeleteIndexResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type DeletionProtection ¶ added in v1.0.0
type DeletionProtection string
DeletionProtection Whether [deletion protection](http://docs.pinecone.io/guides/indexes/prevent-index-deletion) is enabled/disabled for the index.
const ( Disabled DeletionProtection = "disabled" Enabled DeletionProtection = "enabled" )
Defines values for DeletionProtection.
type DescribeCollectionResponse ¶
type DescribeCollectionResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *CollectionModel
JSON401 *ErrorResponse
JSON404 *ErrorResponse
JSON500 *ErrorResponse
}
func ParseDescribeCollectionResponse ¶
func ParseDescribeCollectionResponse(rsp *http.Response) (*DescribeCollectionResponse, error)
ParseDescribeCollectionResponse parses an HTTP response from a DescribeCollectionWithResponse call
func (DescribeCollectionResponse) Status ¶
func (r DescribeCollectionResponse) Status() string
Status returns HTTPResponse.Status
func (DescribeCollectionResponse) StatusCode ¶
func (r DescribeCollectionResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type DescribeIndexResponse ¶
type DescribeIndexResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *IndexModel
JSON401 *ErrorResponse
JSON404 *ErrorResponse
JSON500 *ErrorResponse
}
func ParseDescribeIndexResponse ¶
func ParseDescribeIndexResponse(rsp *http.Response) (*DescribeIndexResponse, error)
ParseDescribeIndexResponse parses an HTTP response from a DescribeIndexWithResponse call
func (DescribeIndexResponse) Status ¶
func (r DescribeIndexResponse) Status() string
Status returns HTTPResponse.Status
func (DescribeIndexResponse) StatusCode ¶
func (r DescribeIndexResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type EmbedJSONRequestBody ¶ added in v1.0.0
type EmbedJSONRequestBody = EmbedRequest
EmbedJSONRequestBody defines body for Embed for application/json ContentType.
type EmbedRequest ¶ added in v1.0.0
type EmbedRequest struct {
Inputs []struct {
Text *string `json:"text,omitempty"`
} `json:"inputs"`
Model string `json:"model"`
// Parameters Model-specific parameters.
Parameters *struct {
// InputType Common property used to distinguish between types of data.
InputType *string `json:"input_type,omitempty"`
// Truncate How to handle inputs longer than those supported by the model. If NONE, when the input exceeds the maximum input token length an error will be returned.
Truncate *string `json:"truncate,omitempty"`
} `json:"parameters,omitempty"`
}
EmbedRequest Generate embeddings for inputs
type EmbedResponse ¶ added in v1.0.0
type EmbedResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *EmbeddingsList
JSON400 *ErrorResponse
JSON401 *ErrorResponse
JSON500 *ErrorResponse
}
func ParseEmbedResponse ¶ added in v1.0.0
func ParseEmbedResponse(rsp *http.Response) (*EmbedResponse, error)
ParseEmbedResponse parses an HTTP response from a EmbedWithResponse call
func (EmbedResponse) Status ¶ added in v1.0.0
func (r EmbedResponse) Status() string
Status returns HTTPResponse.Status
func (EmbedResponse) StatusCode ¶ added in v1.0.0
func (r EmbedResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type Embedding ¶ added in v1.0.0
type Embedding struct {
// Values The embedding values.
Values *[]float32 `json:"values,omitempty"`
}
Embedding Embedding of a single input
type EmbeddingsList ¶ added in v1.0.0
type EmbeddingsList struct {
Data *[]Embedding `json:"data,omitempty"`
Model *string `json:"model,omitempty"`
// Usage Usage statistics for model inference including any instruction prefixes
Usage *struct {
TotalTokens *int `json:"total_tokens,omitempty"`
} `json:"usage,omitempty"`
}
EmbeddingsList Embeddings generated for the input
type ErrorResponse ¶
type ErrorResponse struct {
// Error Detailed information about the error that occurred.
Error struct {
Code ErrorResponseErrorCode `json:"code"`
// Details Additional information about the error. This field is not guaranteed to be present.
Details *map[string]interface{} `json:"details,omitempty"`
Message string `json:"message"`
} `json:"error"`
// Status The HTTP status code of the error.
Status int `json:"status"`
}
ErrorResponse The response shape used for all error responses.
type ErrorResponseErrorCode ¶
type ErrorResponseErrorCode string
ErrorResponseErrorCode defines model for ErrorResponse.Error.Code.
const ( ABORTED ErrorResponseErrorCode = "ABORTED" ALREADYEXISTS ErrorResponseErrorCode = "ALREADY_EXISTS" DATALOSS ErrorResponseErrorCode = "DATA_LOSS" DEADLINEEXCEEDED ErrorResponseErrorCode = "DEADLINE_EXCEEDED" FAILEDPRECONDITION ErrorResponseErrorCode = "FAILED_PRECONDITION" FORBIDDEN ErrorResponseErrorCode = "FORBIDDEN" INTERNAL ErrorResponseErrorCode = "INTERNAL" INVALIDARGUMENT ErrorResponseErrorCode = "INVALID_ARGUMENT" NOTFOUND ErrorResponseErrorCode = "NOT_FOUND" OK ErrorResponseErrorCode = "OK" OUTOFRANGE ErrorResponseErrorCode = "OUT_OF_RANGE" PERMISSIONDENIED ErrorResponseErrorCode = "PERMISSION_DENIED" QUOTAEXCEEDED ErrorResponseErrorCode = "QUOTA_EXCEEDED" RESOURCEEXHAUSTED ErrorResponseErrorCode = "RESOURCE_EXHAUSTED" UNAUTHENTICATED ErrorResponseErrorCode = "UNAUTHENTICATED" UNAVAILABLE ErrorResponseErrorCode = "UNAVAILABLE" UNIMPLEMENTED ErrorResponseErrorCode = "UNIMPLEMENTED" UNKNOWN ErrorResponseErrorCode = "UNKNOWN" UNPROCESSABLEENTITY ErrorResponseErrorCode = "UNPROCESSABLE_ENTITY" )
Defines values for ErrorResponseErrorCode.
type HttpRequestDoer ¶
Doer performs HTTP requests.
The standard http.Client implements this interface.
type IndexList ¶
type IndexList struct {
Indexes *[]IndexModel `json:"indexes,omitempty"`
}
IndexList The list of indexes that exist in the project.
type IndexModel ¶
type IndexModel struct {
// DeletionProtection Whether [deletion protection](http://docs.pinecone.io/guides/indexes/prevent-index-deletion) is enabled/disabled for the index.
DeletionProtection *DeletionProtection `json:"deletion_protection,omitempty"`
// Dimension The dimensions of the vectors to be inserted in the index.
Dimension int32 `json:"dimension"`
// Host The URL address where the index is hosted.
Host string `json:"host"`
// Metric The distance metric to be used for similarity search. You can use 'euclidean', 'cosine', or 'dotproduct'.
Metric IndexModelMetric `json:"metric"`
// Name The name of the index. Resource name must be 1-45 characters long, start and end with an alphanumeric character, and consist only of lower case alphanumeric characters or '-'.
Name string `json:"name"`
Spec struct {
// Pod Configuration needed to deploy a pod-based index.
Pod *PodSpec `json:"pod,omitempty"`
// Serverless Configuration needed to deploy a serverless index.
Serverless *ServerlessSpec `json:"serverless,omitempty"`
} `json:"spec"`
Status struct {
Ready bool `json:"ready"`
State IndexModelStatusState `json:"state"`
} `json:"status"`
}
IndexModel The IndexModel describes the configuration and status of a Pinecone index.
type IndexModelMetric ¶ added in v1.0.0
type IndexModelMetric string
IndexModelMetric The distance metric to be used for similarity search. You can use 'euclidean', 'cosine', or 'dotproduct'.
const ( IndexModelMetricCosine IndexModelMetric = "cosine" IndexModelMetricDotproduct IndexModelMetric = "dotproduct" IndexModelMetricEuclidean IndexModelMetric = "euclidean" )
Defines values for IndexModelMetric.
type IndexModelStatusState ¶
type IndexModelStatusState string
IndexModelStatusState defines model for IndexModel.Status.State.
const ( IndexModelStatusStateInitializationFailed IndexModelStatusState = "InitializationFailed" IndexModelStatusStateInitializing IndexModelStatusState = "Initializing" IndexModelStatusStateReady IndexModelStatusState = "Ready" IndexModelStatusStateScalingDown IndexModelStatusState = "ScalingDown" IndexModelStatusStateScalingDownPodSize IndexModelStatusState = "ScalingDownPodSize" IndexModelStatusStateScalingUp IndexModelStatusState = "ScalingUp" IndexModelStatusStateScalingUpPodSize IndexModelStatusState = "ScalingUpPodSize" IndexModelStatusStateTerminating IndexModelStatusState = "Terminating" )
Defines values for IndexModelStatusState.
type IndexSpec ¶ added in v1.0.0
type IndexSpec struct {
// Pod Configuration needed to deploy a pod-based index.
Pod *PodSpec `json:"pod,omitempty"`
// Serverless Configuration needed to deploy a serverless index.
Serverless *ServerlessSpec `json:"serverless,omitempty"`
// contains filtered or unexported fields
}
IndexSpec The spec object defines how the index should be deployed.
For serverless indexes, you define only the [cloud and region](http://docs.pinecone.io/guides/indexes/understanding-indexes#cloud-regions) where the index should be hosted. For pod-based indexes, you define the [environment](http://docs.pinecone.io/guides/indexes/understanding-indexes#pod-environments) where the index should be hosted, the [pod type and size](http://docs.pinecone.io/guides/indexes/understanding-indexes#pod-types) to use, and other index characteristics.
func (IndexSpec) AsIndexSpec0 ¶ added in v1.0.0
func (t IndexSpec) AsIndexSpec0() (IndexSpec0, error)
AsIndexSpec0 returns the union data inside the IndexSpec as a IndexSpec0
func (IndexSpec) AsIndexSpec1 ¶ added in v1.0.0
func (t IndexSpec) AsIndexSpec1() (IndexSpec1, error)
AsIndexSpec1 returns the union data inside the IndexSpec as a IndexSpec1
func (*IndexSpec) FromIndexSpec0 ¶ added in v1.0.0
func (t *IndexSpec) FromIndexSpec0(v IndexSpec0) error
FromIndexSpec0 overwrites any union data inside the IndexSpec as the provided IndexSpec0
func (*IndexSpec) FromIndexSpec1 ¶ added in v1.0.0
func (t *IndexSpec) FromIndexSpec1(v IndexSpec1) error
FromIndexSpec1 overwrites any union data inside the IndexSpec as the provided IndexSpec1
func (IndexSpec) MarshalJSON ¶ added in v1.0.0
func (*IndexSpec) MergeIndexSpec0 ¶ added in v1.0.0
func (t *IndexSpec) MergeIndexSpec0(v IndexSpec0) error
MergeIndexSpec0 performs a merge with any union data inside the IndexSpec, using the provided IndexSpec0
func (*IndexSpec) MergeIndexSpec1 ¶ added in v1.0.0
func (t *IndexSpec) MergeIndexSpec1(v IndexSpec1) error
MergeIndexSpec1 performs a merge with any union data inside the IndexSpec, using the provided IndexSpec1
func (*IndexSpec) UnmarshalJSON ¶ added in v1.0.0
type ListCollectionsResponse ¶
type ListCollectionsResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *CollectionList
JSON401 *ErrorResponse
JSON500 *ErrorResponse
}
func ParseListCollectionsResponse ¶
func ParseListCollectionsResponse(rsp *http.Response) (*ListCollectionsResponse, error)
ParseListCollectionsResponse parses an HTTP response from a ListCollectionsWithResponse call
func (ListCollectionsResponse) Status ¶
func (r ListCollectionsResponse) Status() string
Status returns HTTPResponse.Status
func (ListCollectionsResponse) StatusCode ¶
func (r ListCollectionsResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type ListIndexesResponse ¶
type ListIndexesResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *IndexList
JSON401 *ErrorResponse
JSON500 *ErrorResponse
}
func ParseListIndexesResponse ¶
func ParseListIndexesResponse(rsp *http.Response) (*ListIndexesResponse, error)
ParseListIndexesResponse parses an HTTP response from a ListIndexesWithResponse call
func (ListIndexesResponse) Status ¶
func (r ListIndexesResponse) Status() string
Status returns HTTPResponse.Status
func (ListIndexesResponse) StatusCode ¶
func (r ListIndexesResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type PodSpec ¶
type PodSpec struct {
// Environment The environment where the index is hosted.
Environment string `json:"environment"`
// MetadataConfig Configuration for the behavior of Pinecone's internal metadata index. By default, all metadata is indexed; when `metadata_config` is present, only specified metadata fields are indexed. These configurations are only valid for use with pod-based indexes.
MetadataConfig *struct {
// Indexed By default, all metadata is indexed; to change this behavior, use this property to specify an array of metadata fields that should be indexed.
Indexed *[]string `json:"indexed,omitempty"`
} `json:"metadata_config,omitempty"`
// PodType The type of pod to use. One of `s1`, `p1`, or `p2` appended with `.` and one of `x1`, `x2`, `x4`, or `x8`.
PodType string `json:"pod_type"`
// Pods The number of pods to be used in the index. This should be equal to `shards` x `replicas`.'
Pods int `json:"pods"`
// Replicas The number of replicas. Replicas duplicate your index. They provide higher availability and throughput. Replicas can be scaled up or down as your needs change.
Replicas int32 `json:"replicas"`
// Shards The number of shards. Shards split your data across multiple pods so you can fit more data into an index.
Shards int32 `json:"shards"`
// SourceCollection The name of the collection to be used as the source for the index.
SourceCollection *string `json:"source_collection,omitempty"`
}
PodSpec Configuration needed to deploy a pod-based index.
type RequestEditorFn ¶
RequestEditorFn is the function signature for the RequestEditor callback function
type ServerlessSpec ¶
type ServerlessSpec struct {
// Cloud The public cloud where you would like your index hosted.
Cloud ServerlessSpecCloud `json:"cloud"`
// Region The region where you would like your index to be created.
Region string `json:"region"`
}
ServerlessSpec Configuration needed to deploy a serverless index.
type ServerlessSpecCloud ¶
type ServerlessSpecCloud string
ServerlessSpecCloud The public cloud where you would like your index hosted.
const ( Aws ServerlessSpecCloud = "aws" Azure ServerlessSpecCloud = "azure" Gcp ServerlessSpecCloud = "gcp" )
Defines values for ServerlessSpecCloud.