Documentation
¶
Overview ¶
Package control provides primitives to interact with the openapi HTTP API.
Code generated by github.com/deepmap/oapi-codegen/v2 version v2.1.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 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) 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) 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 CreateIndexRequestSpec0
- type CreateIndexRequestSpec1
- type CreateIndexRequest_Spec
- func (t CreateIndexRequest_Spec) AsCreateIndexRequestSpec0() (CreateIndexRequestSpec0, error)
- func (t CreateIndexRequest_Spec) AsCreateIndexRequestSpec1() (CreateIndexRequestSpec1, error)
- func (t *CreateIndexRequest_Spec) FromCreateIndexRequestSpec0(v CreateIndexRequestSpec0) error
- func (t *CreateIndexRequest_Spec) FromCreateIndexRequestSpec1(v CreateIndexRequestSpec1) error
- func (t CreateIndexRequest_Spec) MarshalJSON() ([]byte, error)
- func (t *CreateIndexRequest_Spec) MergeCreateIndexRequestSpec0(v CreateIndexRequestSpec0) error
- func (t *CreateIndexRequest_Spec) MergeCreateIndexRequestSpec1(v CreateIndexRequestSpec1) error
- func (t *CreateIndexRequest_Spec) UnmarshalJSON(b []byte) error
- type CreateIndexResponse
- type DeleteCollectionResponse
- type DeleteIndexResponse
- type DescribeCollectionResponse
- type DescribeIndexResponse
- type ErrorResponse
- type ErrorResponseErrorCode
- type HttpRequestDoer
- type IndexDimension
- type IndexHost
- type IndexList
- type IndexMetric
- type IndexModel
- type IndexModelStatusState
- type IndexName
- type ListCollectionsResponse
- type ListIndexesResponse
- type N400BadRequest
- type N401Unauthorized
- type N403CollectionsQuotaExceeded
- type N403PodQuotaExceeded
- type N404CollectionNotFound
- type N404IndexNotFound
- type N404ServerlessSpecNotFound
- type N412PendingCollection
- type N422UnprocessableEntity
- type N500InternalServerError
- type PodSpec
- type PodSpecPodType
- type PodSpecReplicas
- type PodSpecShards
- 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 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) 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) // 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) 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) // 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 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 { 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 *PodSpecPodType `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 *PodSpecReplicas `json:"replicas,omitempty"` } `json:"pod"` } `json:"spec"` }
ConfigureIndexRequest Configuration used to scale an index.
type ConfigureIndexResponse ¶
type ConfigureIndexResponse struct { Body []byte HTTPResponse *http.Response JSON202 *IndexModel JSON400 *N400BadRequest JSON401 *N401Unauthorized JSON403 *N403PodQuotaExceeded JSON404 *N404IndexNotFound JSON422 *N422UnprocessableEntity JSON500 *N500InternalServerError }
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 *N400BadRequest JSON401 *N401Unauthorized JSON403 *N403CollectionsQuotaExceeded JSON409 *ErrorResponse JSON422 *N422UnprocessableEntity JSON500 *N500InternalServerError }
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 { // Dimension The dimensions of the vectors to be inserted in the index. Dimension IndexDimension `json:"dimension"` // Metric The distance metric to be used for similarity search. You can use 'euclidean', 'cosine', or 'dotproduct'. Metric *IndexMetric `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 IndexName `json:"name"` // Spec The spec object defines how the index should be deployed. // // For serverless indexes, you define only the cloud and region where the index should be hosted. For pod-based indexes, you define the environment where the index should be hosted, the pod type and size to use, and other index characteristics. // // Serverless indexes are in public preview and are available only on AWS in the us-west-2 region. Test thoroughly before using serverless indexes in production. Spec CreateIndexRequest_Spec `json:"spec"` }
CreateIndexRequest The configuration needed to create a Pinecone index.
type CreateIndexRequestSpec0 ¶
type CreateIndexRequestSpec0 = interface{}
CreateIndexRequestSpec0 defines model for .
type CreateIndexRequestSpec1 ¶
type CreateIndexRequestSpec1 = interface{}
CreateIndexRequestSpec1 defines model for .
type CreateIndexRequest_Spec ¶
type CreateIndexRequest_Spec struct { // Pod Configuration needed to deploy a pod-based index. Pod *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 which 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 PodSpecPodType `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,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 *PodSpecReplicas `json:"replicas,omitempty"` // Shards The number of shards. Shards split your data across multiple pods so you can fit more data into an index. Shards *PodSpecShards `json:"shards,omitempty"` // SourceCollection The name of the collection to be used as the source for the index. SourceCollection *string `json:"source_collection,omitempty"` } `json:"pod,omitempty"` // Serverless Configuration needed to deploy a serverless index. Serverless *ServerlessSpec `json:"serverless,omitempty"` // contains filtered or unexported fields }
CreateIndexRequest_Spec The spec object defines how the index should be deployed.
For serverless indexes, you define only the cloud and region where the index should be hosted. For pod-based indexes, you define the environment where the index should be hosted, the pod type and size to use, and other index characteristics.
Serverless indexes are in public preview and are available only on AWS in the us-west-2 region. Test thoroughly before using serverless indexes in production.
func (CreateIndexRequest_Spec) AsCreateIndexRequestSpec0 ¶
func (t CreateIndexRequest_Spec) AsCreateIndexRequestSpec0() (CreateIndexRequestSpec0, error)
AsCreateIndexRequestSpec0 returns the union data inside the CreateIndexRequest_Spec as a CreateIndexRequestSpec0
func (CreateIndexRequest_Spec) AsCreateIndexRequestSpec1 ¶
func (t CreateIndexRequest_Spec) AsCreateIndexRequestSpec1() (CreateIndexRequestSpec1, error)
AsCreateIndexRequestSpec1 returns the union data inside the CreateIndexRequest_Spec as a CreateIndexRequestSpec1
func (*CreateIndexRequest_Spec) FromCreateIndexRequestSpec0 ¶
func (t *CreateIndexRequest_Spec) FromCreateIndexRequestSpec0(v CreateIndexRequestSpec0) error
FromCreateIndexRequestSpec0 overwrites any union data inside the CreateIndexRequest_Spec as the provided CreateIndexRequestSpec0
func (*CreateIndexRequest_Spec) FromCreateIndexRequestSpec1 ¶
func (t *CreateIndexRequest_Spec) FromCreateIndexRequestSpec1(v CreateIndexRequestSpec1) error
FromCreateIndexRequestSpec1 overwrites any union data inside the CreateIndexRequest_Spec as the provided CreateIndexRequestSpec1
func (CreateIndexRequest_Spec) MarshalJSON ¶
func (t CreateIndexRequest_Spec) MarshalJSON() ([]byte, error)
func (*CreateIndexRequest_Spec) MergeCreateIndexRequestSpec0 ¶
func (t *CreateIndexRequest_Spec) MergeCreateIndexRequestSpec0(v CreateIndexRequestSpec0) error
MergeCreateIndexRequestSpec0 performs a merge with any union data inside the CreateIndexRequest_Spec, using the provided CreateIndexRequestSpec0
func (*CreateIndexRequest_Spec) MergeCreateIndexRequestSpec1 ¶
func (t *CreateIndexRequest_Spec) MergeCreateIndexRequestSpec1(v CreateIndexRequestSpec1) error
MergeCreateIndexRequestSpec1 performs a merge with any union data inside the CreateIndexRequest_Spec, using the provided CreateIndexRequestSpec1
func (*CreateIndexRequest_Spec) UnmarshalJSON ¶
func (t *CreateIndexRequest_Spec) UnmarshalJSON(b []byte) error
type CreateIndexResponse ¶
type CreateIndexResponse struct { Body []byte HTTPResponse *http.Response JSON201 *IndexModel JSON400 *N400BadRequest JSON401 *N401Unauthorized JSON403 *N403PodQuotaExceeded JSON404 *N404ServerlessSpecNotFound JSON409 *ErrorResponse JSON422 *N422UnprocessableEntity JSON500 *N500InternalServerError }
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 *N401Unauthorized JSON404 *N404CollectionNotFound JSON500 *N500InternalServerError }
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 *N401Unauthorized JSON404 *N404IndexNotFound JSON412 *N412PendingCollection JSON500 *N500InternalServerError }
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 DescribeCollectionResponse ¶
type DescribeCollectionResponse struct { Body []byte HTTPResponse *http.Response JSON200 *CollectionModel JSON401 *N401Unauthorized JSON404 *N404CollectionNotFound JSON500 *N500InternalServerError }
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 *N401Unauthorized JSON404 *N404IndexNotFound JSON500 *N500InternalServerError }
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 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" )
Defines values for ErrorResponseErrorCode.
type HttpRequestDoer ¶
Doer performs HTTP requests.
The standard http.Client implements this interface.
type IndexDimension ¶
type IndexDimension = int32
IndexDimension The dimensions of the vectors to be inserted in the index.
type IndexList ¶
type IndexList struct {
Indexes *[]IndexModel `json:"indexes,omitempty"`
}
IndexList The list of indexes that exist in the project.
type IndexMetric ¶
type IndexMetric string
IndexMetric The distance metric to be used for similarity search. You can use 'euclidean', 'cosine', or 'dotproduct'.
const ( Cosine IndexMetric = "cosine" Dotproduct IndexMetric = "dotproduct" Euclidean IndexMetric = "euclidean" )
Defines values for IndexMetric.
type IndexModel ¶
type IndexModel struct { // Dimension The dimensions of the vectors to be inserted in the index. Dimension IndexDimension `json:"dimension"` // Host The URL address where the index is hosted. Host IndexHost `json:"host"` // Metric The distance metric to be used for similarity search. You can use 'euclidean', 'cosine', or 'dotproduct'. Metric IndexMetric `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 IndexName `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 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 IndexName ¶
type IndexName = string
IndexName 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 '-'.
type ListCollectionsResponse ¶
type ListCollectionsResponse struct { Body []byte HTTPResponse *http.Response JSON200 *CollectionList JSON401 *N401Unauthorized JSON500 *N500InternalServerError }
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 *N401Unauthorized JSON500 *N500InternalServerError }
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 N400BadRequest ¶
type N400BadRequest = ErrorResponse
N400BadRequest The response shape used for all error responses.
type N401Unauthorized ¶
type N401Unauthorized = ErrorResponse
N401Unauthorized The response shape used for all error responses.
type N403CollectionsQuotaExceeded ¶
type N403CollectionsQuotaExceeded = ErrorResponse
N403CollectionsQuotaExceeded The response shape used for all error responses.
type N403PodQuotaExceeded ¶
type N403PodQuotaExceeded = ErrorResponse
N403PodQuotaExceeded The response shape used for all error responses.
type N404CollectionNotFound ¶
type N404CollectionNotFound = ErrorResponse
N404CollectionNotFound The response shape used for all error responses.
type N404IndexNotFound ¶
type N404IndexNotFound = ErrorResponse
N404IndexNotFound The response shape used for all error responses.
type N404ServerlessSpecNotFound ¶
type N404ServerlessSpecNotFound = ErrorResponse
N404ServerlessSpecNotFound The response shape used for all error responses.
type N412PendingCollection ¶
type N412PendingCollection = ErrorResponse
N412PendingCollection The response shape used for all error responses.
type N422UnprocessableEntity ¶
type N422UnprocessableEntity = ErrorResponse
N422UnprocessableEntity The response shape used for all error responses.
type N500InternalServerError ¶
type N500InternalServerError = ErrorResponse
N500InternalServerError The response shape used for all error responses.
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 PodSpecPodType `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 PodSpecReplicas `json:"replicas"` // Shards The number of shards. Shards split your data across multiple pods so you can fit more data into an index. Shards PodSpecShards `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 PodSpecPodType ¶
type PodSpecPodType = string
PodSpecPodType The type of pod to use. One of `s1`, `p1`, or `p2` appended with `.` and one of `x1`, `x2`, `x4`, or `x8`.
type PodSpecReplicas ¶
type PodSpecReplicas = int32
PodSpecReplicas 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.
type PodSpecShards ¶
type PodSpecShards = int32
PodSpecShards The number of shards. Shards split your data across multiple pods so you can fit more data into an 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. Serverless indexes can be hosted only in AWS at this time. Cloud ServerlessSpecCloud `json:"cloud"` // Region The region where you would like your index to be created. Serverless indexes can be created only in the us-west-2 region of AWS at this time. 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. Serverless indexes can be hosted only in AWS at this time.
const ( Aws ServerlessSpecCloud = "aws" Azure ServerlessSpecCloud = "azure" Gcp ServerlessSpecCloud = "gcp" )
Defines values for ServerlessSpecCloud.