Documentation ¶
Index ¶
- type Error
- type IndexDeleteByIDsParams
- type IndexDeleteByIDsResponseEnvelope
- type IndexDeleteByIDsResponseEnvelopeErrors
- type IndexDeleteByIDsResponseEnvelopeMessages
- type IndexDeleteByIDsResponseEnvelopeSuccess
- type IndexDeleteResponse
- type IndexDeleteResponseEnvelope
- type IndexDeleteResponseEnvelopeErrors
- type IndexDeleteResponseEnvelopeMessages
- type IndexDeleteResponseEnvelopeSuccess
- type IndexGetByIDsParams
- type IndexGetByIDsResponse
- type IndexGetByIDsResponseEnvelope
- type IndexGetByIDsResponseEnvelopeErrors
- type IndexGetByIDsResponseEnvelopeMessages
- type IndexGetByIDsResponseEnvelopeSuccess
- type IndexGetResponseEnvelope
- type IndexGetResponseEnvelopeErrors
- type IndexGetResponseEnvelopeMessages
- type IndexGetResponseEnvelopeSuccess
- type IndexInsertResponseEnvelope
- type IndexInsertResponseEnvelopeErrors
- type IndexInsertResponseEnvelopeMessages
- type IndexInsertResponseEnvelopeSuccess
- type IndexListResponseEnvelope
- type IndexListResponseEnvelopeErrors
- type IndexListResponseEnvelopeMessages
- type IndexListResponseEnvelopeSuccess
- type IndexNewParams
- type IndexNewParamsConfig
- type IndexNewParamsConfigVectorizeIndexDimensionConfiguration
- type IndexNewParamsConfigVectorizeIndexDimensionConfigurationMetric
- type IndexNewParamsConfigVectorizeIndexPresetConfiguration
- type IndexNewParamsConfigVectorizeIndexPresetConfigurationPreset
- type IndexNewResponseEnvelope
- type IndexNewResponseEnvelopeErrors
- type IndexNewResponseEnvelopeMessages
- type IndexNewResponseEnvelopeSuccess
- type IndexQueryParams
- type IndexQueryResponseEnvelope
- type IndexQueryResponseEnvelopeErrors
- type IndexQueryResponseEnvelopeMessages
- type IndexQueryResponseEnvelopeSuccess
- type IndexService
- func (r *IndexService) Delete(ctx context.Context, accountIdentifier string, indexName string, ...) (res *IndexDeleteResponse, err error)
- func (r *IndexService) DeleteByIDs(ctx context.Context, accountIdentifier string, indexName string, ...) (res *VectorizeIndexDeleteVectorsByID, err error)
- func (r *IndexService) Get(ctx context.Context, accountIdentifier string, indexName string, ...) (res *VectorizeCreateIndex, err error)
- func (r *IndexService) GetByIDs(ctx context.Context, accountIdentifier string, indexName string, ...) (res *IndexGetByIDsResponse, err error)
- func (r *IndexService) Insert(ctx context.Context, accountIdentifier string, indexName string, ...) (res *VectorizeIndexInsert, err error)
- func (r *IndexService) List(ctx context.Context, accountIdentifier string, opts ...option.RequestOption) (res *[]VectorizeCreateIndex, err error)
- func (r *IndexService) New(ctx context.Context, accountIdentifier string, body IndexNewParams, ...) (res *VectorizeCreateIndex, err error)
- func (r *IndexService) Query(ctx context.Context, accountIdentifier string, indexName string, ...) (res *VectorizeIndexQuery, err error)
- func (r *IndexService) Update(ctx context.Context, accountIdentifier string, indexName string, ...) (res *VectorizeCreateIndex, err error)
- func (r *IndexService) Upsert(ctx context.Context, accountIdentifier string, indexName string, ...) (res *VectorizeIndexUpsert, err error)
- type IndexUpdateParams
- type IndexUpdateResponseEnvelope
- type IndexUpdateResponseEnvelopeErrors
- type IndexUpdateResponseEnvelopeMessages
- type IndexUpdateResponseEnvelopeSuccess
- type IndexUpsertResponseEnvelope
- type IndexUpsertResponseEnvelopeErrors
- type IndexUpsertResponseEnvelopeMessages
- type IndexUpsertResponseEnvelopeSuccess
- type VectorizeCreateIndex
- type VectorizeCreateIndexConfig
- type VectorizeCreateIndexConfigMetric
- type VectorizeIndexDeleteVectorsByID
- type VectorizeIndexInsert
- type VectorizeIndexQuery
- type VectorizeIndexQueryMatch
- type VectorizeIndexUpsert
- type VectorizeService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IndexDeleteByIDsParams ¶
type IndexDeleteByIDsParams struct { // A list of vector identifiers to delete from the index indicated by the path. IDs param.Field[[]string] `json:"ids"` }
func (IndexDeleteByIDsParams) MarshalJSON ¶
func (r IndexDeleteByIDsParams) MarshalJSON() (data []byte, err error)
type IndexDeleteByIDsResponseEnvelope ¶
type IndexDeleteByIDsResponseEnvelope struct { Errors []IndexDeleteByIDsResponseEnvelopeErrors `json:"errors,required"` Messages []IndexDeleteByIDsResponseEnvelopeMessages `json:"messages,required"` Result VectorizeIndexDeleteVectorsByID `json:"result,required,nullable"` // Whether the API call was successful Success IndexDeleteByIDsResponseEnvelopeSuccess `json:"success,required"` JSON indexDeleteByIDsResponseEnvelopeJSON `json:"-"` }
func (*IndexDeleteByIDsResponseEnvelope) UnmarshalJSON ¶
func (r *IndexDeleteByIDsResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type IndexDeleteByIDsResponseEnvelopeErrors ¶
type IndexDeleteByIDsResponseEnvelopeErrors struct { Code int64 `json:"code,required"` Message string `json:"message,required"` JSON indexDeleteByIDsResponseEnvelopeErrorsJSON `json:"-"` }
func (*IndexDeleteByIDsResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *IndexDeleteByIDsResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type IndexDeleteByIDsResponseEnvelopeMessages ¶
type IndexDeleteByIDsResponseEnvelopeMessages struct { Code int64 `json:"code,required"` Message string `json:"message,required"` JSON indexDeleteByIDsResponseEnvelopeMessagesJSON `json:"-"` }
func (*IndexDeleteByIDsResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *IndexDeleteByIDsResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type IndexDeleteByIDsResponseEnvelopeSuccess ¶
type IndexDeleteByIDsResponseEnvelopeSuccess bool
Whether the API call was successful
const (
IndexDeleteByIDsResponseEnvelopeSuccessTrue IndexDeleteByIDsResponseEnvelopeSuccess = true
)
func (IndexDeleteByIDsResponseEnvelopeSuccess) IsKnown ¶
func (r IndexDeleteByIDsResponseEnvelopeSuccess) IsKnown() bool
type IndexDeleteResponse ¶
type IndexDeleteResponse interface {
ImplementsVectorizeIndexDeleteResponse()
}
Union satisfied by vectorize.IndexDeleteResponseUnknown or shared.UnionString.
type IndexDeleteResponseEnvelope ¶
type IndexDeleteResponseEnvelope struct { Errors []IndexDeleteResponseEnvelopeErrors `json:"errors,required"` Messages []IndexDeleteResponseEnvelopeMessages `json:"messages,required"` Result IndexDeleteResponse `json:"result,required,nullable"` // Whether the API call was successful Success IndexDeleteResponseEnvelopeSuccess `json:"success,required"` JSON indexDeleteResponseEnvelopeJSON `json:"-"` }
func (*IndexDeleteResponseEnvelope) UnmarshalJSON ¶
func (r *IndexDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type IndexDeleteResponseEnvelopeErrors ¶
type IndexDeleteResponseEnvelopeErrors struct { Code int64 `json:"code,required"` Message string `json:"message,required"` JSON indexDeleteResponseEnvelopeErrorsJSON `json:"-"` }
func (*IndexDeleteResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *IndexDeleteResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type IndexDeleteResponseEnvelopeMessages ¶
type IndexDeleteResponseEnvelopeMessages struct { Code int64 `json:"code,required"` Message string `json:"message,required"` JSON indexDeleteResponseEnvelopeMessagesJSON `json:"-"` }
func (*IndexDeleteResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *IndexDeleteResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type IndexDeleteResponseEnvelopeSuccess ¶
type IndexDeleteResponseEnvelopeSuccess bool
Whether the API call was successful
const (
IndexDeleteResponseEnvelopeSuccessTrue IndexDeleteResponseEnvelopeSuccess = true
)
func (IndexDeleteResponseEnvelopeSuccess) IsKnown ¶
func (r IndexDeleteResponseEnvelopeSuccess) IsKnown() bool
type IndexGetByIDsParams ¶
type IndexGetByIDsParams struct { // A list of vector identifiers to retrieve from the index indicated by the path. IDs param.Field[[]string] `json:"ids"` }
func (IndexGetByIDsParams) MarshalJSON ¶
func (r IndexGetByIDsParams) MarshalJSON() (data []byte, err error)
type IndexGetByIDsResponse ¶
type IndexGetByIDsResponse = interface{}
type IndexGetByIDsResponseEnvelope ¶
type IndexGetByIDsResponseEnvelope struct { Errors []IndexGetByIDsResponseEnvelopeErrors `json:"errors,required"` Messages []IndexGetByIDsResponseEnvelopeMessages `json:"messages,required"` // Array of vectors with matching ids. Result IndexGetByIDsResponse `json:"result,required,nullable"` // Whether the API call was successful Success IndexGetByIDsResponseEnvelopeSuccess `json:"success,required"` JSON indexGetByIDsResponseEnvelopeJSON `json:"-"` }
func (*IndexGetByIDsResponseEnvelope) UnmarshalJSON ¶
func (r *IndexGetByIDsResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type IndexGetByIDsResponseEnvelopeErrors ¶
type IndexGetByIDsResponseEnvelopeErrors struct { Code int64 `json:"code,required"` Message string `json:"message,required"` JSON indexGetByIDsResponseEnvelopeErrorsJSON `json:"-"` }
func (*IndexGetByIDsResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *IndexGetByIDsResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type IndexGetByIDsResponseEnvelopeMessages ¶
type IndexGetByIDsResponseEnvelopeMessages struct { Code int64 `json:"code,required"` Message string `json:"message,required"` JSON indexGetByIDsResponseEnvelopeMessagesJSON `json:"-"` }
func (*IndexGetByIDsResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *IndexGetByIDsResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type IndexGetByIDsResponseEnvelopeSuccess ¶
type IndexGetByIDsResponseEnvelopeSuccess bool
Whether the API call was successful
const (
IndexGetByIDsResponseEnvelopeSuccessTrue IndexGetByIDsResponseEnvelopeSuccess = true
)
func (IndexGetByIDsResponseEnvelopeSuccess) IsKnown ¶
func (r IndexGetByIDsResponseEnvelopeSuccess) IsKnown() bool
type IndexGetResponseEnvelope ¶
type IndexGetResponseEnvelope struct { Errors []IndexGetResponseEnvelopeErrors `json:"errors,required"` Messages []IndexGetResponseEnvelopeMessages `json:"messages,required"` Result VectorizeCreateIndex `json:"result,required,nullable"` // Whether the API call was successful Success IndexGetResponseEnvelopeSuccess `json:"success,required"` JSON indexGetResponseEnvelopeJSON `json:"-"` }
func (*IndexGetResponseEnvelope) UnmarshalJSON ¶
func (r *IndexGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type IndexGetResponseEnvelopeErrors ¶
type IndexGetResponseEnvelopeErrors struct { Code int64 `json:"code,required"` Message string `json:"message,required"` JSON indexGetResponseEnvelopeErrorsJSON `json:"-"` }
func (*IndexGetResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *IndexGetResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type IndexGetResponseEnvelopeMessages ¶
type IndexGetResponseEnvelopeMessages struct { Code int64 `json:"code,required"` Message string `json:"message,required"` JSON indexGetResponseEnvelopeMessagesJSON `json:"-"` }
func (*IndexGetResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *IndexGetResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type IndexGetResponseEnvelopeSuccess ¶
type IndexGetResponseEnvelopeSuccess bool
Whether the API call was successful
const (
IndexGetResponseEnvelopeSuccessTrue IndexGetResponseEnvelopeSuccess = true
)
func (IndexGetResponseEnvelopeSuccess) IsKnown ¶
func (r IndexGetResponseEnvelopeSuccess) IsKnown() bool
type IndexInsertResponseEnvelope ¶
type IndexInsertResponseEnvelope struct { Errors []IndexInsertResponseEnvelopeErrors `json:"errors,required"` Messages []IndexInsertResponseEnvelopeMessages `json:"messages,required"` Result VectorizeIndexInsert `json:"result,required,nullable"` // Whether the API call was successful Success IndexInsertResponseEnvelopeSuccess `json:"success,required"` JSON indexInsertResponseEnvelopeJSON `json:"-"` }
func (*IndexInsertResponseEnvelope) UnmarshalJSON ¶
func (r *IndexInsertResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type IndexInsertResponseEnvelopeErrors ¶
type IndexInsertResponseEnvelopeErrors struct { Code int64 `json:"code,required"` Message string `json:"message,required"` JSON indexInsertResponseEnvelopeErrorsJSON `json:"-"` }
func (*IndexInsertResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *IndexInsertResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type IndexInsertResponseEnvelopeMessages ¶
type IndexInsertResponseEnvelopeMessages struct { Code int64 `json:"code,required"` Message string `json:"message,required"` JSON indexInsertResponseEnvelopeMessagesJSON `json:"-"` }
func (*IndexInsertResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *IndexInsertResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type IndexInsertResponseEnvelopeSuccess ¶
type IndexInsertResponseEnvelopeSuccess bool
Whether the API call was successful
const (
IndexInsertResponseEnvelopeSuccessTrue IndexInsertResponseEnvelopeSuccess = true
)
func (IndexInsertResponseEnvelopeSuccess) IsKnown ¶
func (r IndexInsertResponseEnvelopeSuccess) IsKnown() bool
type IndexListResponseEnvelope ¶
type IndexListResponseEnvelope struct { Errors []IndexListResponseEnvelopeErrors `json:"errors,required"` Messages []IndexListResponseEnvelopeMessages `json:"messages,required"` Result []VectorizeCreateIndex `json:"result,required"` // Whether the API call was successful Success IndexListResponseEnvelopeSuccess `json:"success,required"` JSON indexListResponseEnvelopeJSON `json:"-"` }
func (*IndexListResponseEnvelope) UnmarshalJSON ¶
func (r *IndexListResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type IndexListResponseEnvelopeErrors ¶
type IndexListResponseEnvelopeErrors struct { Code int64 `json:"code,required"` Message string `json:"message,required"` JSON indexListResponseEnvelopeErrorsJSON `json:"-"` }
func (*IndexListResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *IndexListResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type IndexListResponseEnvelopeMessages ¶
type IndexListResponseEnvelopeMessages struct { Code int64 `json:"code,required"` Message string `json:"message,required"` JSON indexListResponseEnvelopeMessagesJSON `json:"-"` }
func (*IndexListResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *IndexListResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type IndexListResponseEnvelopeSuccess ¶
type IndexListResponseEnvelopeSuccess bool
Whether the API call was successful
const (
IndexListResponseEnvelopeSuccessTrue IndexListResponseEnvelopeSuccess = true
)
func (IndexListResponseEnvelopeSuccess) IsKnown ¶
func (r IndexListResponseEnvelopeSuccess) IsKnown() bool
type IndexNewParams ¶
type IndexNewParams struct { // Specifies the type of configuration to use for the index. Config param.Field[IndexNewParamsConfig] `json:"config,required"` Name param.Field[string] `json:"name,required"` // Specifies the description of the index. Description param.Field[string] `json:"description"` }
func (IndexNewParams) MarshalJSON ¶
func (r IndexNewParams) MarshalJSON() (data []byte, err error)
type IndexNewParamsConfig ¶
type IndexNewParamsConfig interface {
// contains filtered or unexported methods
}
Specifies the type of configuration to use for the index.
Satisfied by vectorize.IndexNewParamsConfigVectorizeIndexPresetConfiguration, vectorize.IndexNewParamsConfigVectorizeIndexDimensionConfiguration.
type IndexNewParamsConfigVectorizeIndexDimensionConfiguration ¶
type IndexNewParamsConfigVectorizeIndexDimensionConfiguration struct { // Specifies the number of dimensions for the index Dimensions param.Field[int64] `json:"dimensions,required"` // Specifies the type of metric to use calculating distance. Metric param.Field[IndexNewParamsConfigVectorizeIndexDimensionConfigurationMetric] `json:"metric,required"` }
func (IndexNewParamsConfigVectorizeIndexDimensionConfiguration) MarshalJSON ¶
func (r IndexNewParamsConfigVectorizeIndexDimensionConfiguration) MarshalJSON() (data []byte, err error)
type IndexNewParamsConfigVectorizeIndexDimensionConfigurationMetric ¶
type IndexNewParamsConfigVectorizeIndexDimensionConfigurationMetric string
Specifies the type of metric to use calculating distance.
const ( IndexNewParamsConfigVectorizeIndexDimensionConfigurationMetricCosine IndexNewParamsConfigVectorizeIndexDimensionConfigurationMetric = "cosine" IndexNewParamsConfigVectorizeIndexDimensionConfigurationMetricEuclidean IndexNewParamsConfigVectorizeIndexDimensionConfigurationMetric = "euclidean" IndexNewParamsConfigVectorizeIndexDimensionConfigurationMetricDotProduct IndexNewParamsConfigVectorizeIndexDimensionConfigurationMetric = "dot-product" )
func (IndexNewParamsConfigVectorizeIndexDimensionConfigurationMetric) IsKnown ¶
func (r IndexNewParamsConfigVectorizeIndexDimensionConfigurationMetric) IsKnown() bool
type IndexNewParamsConfigVectorizeIndexPresetConfiguration ¶
type IndexNewParamsConfigVectorizeIndexPresetConfiguration struct { // Specifies the preset to use for the index. Preset param.Field[IndexNewParamsConfigVectorizeIndexPresetConfigurationPreset] `json:"preset,required"` }
func (IndexNewParamsConfigVectorizeIndexPresetConfiguration) MarshalJSON ¶
func (r IndexNewParamsConfigVectorizeIndexPresetConfiguration) MarshalJSON() (data []byte, err error)
type IndexNewParamsConfigVectorizeIndexPresetConfigurationPreset ¶
type IndexNewParamsConfigVectorizeIndexPresetConfigurationPreset string
Specifies the preset to use for the index.
const ( IndexNewParamsConfigVectorizeIndexPresetConfigurationPresetCfBaaiBgeSmallEnV1_5 IndexNewParamsConfigVectorizeIndexPresetConfigurationPreset = "@cf/baai/bge-small-en-v1.5" IndexNewParamsConfigVectorizeIndexPresetConfigurationPresetCfBaaiBgeBaseEnV1_5 IndexNewParamsConfigVectorizeIndexPresetConfigurationPreset = "@cf/baai/bge-base-en-v1.5" IndexNewParamsConfigVectorizeIndexPresetConfigurationPresetCfBaaiBgeLargeEnV1_5 IndexNewParamsConfigVectorizeIndexPresetConfigurationPreset = "@cf/baai/bge-large-en-v1.5" IndexNewParamsConfigVectorizeIndexPresetConfigurationPresetOpenAITextEmbeddingAda002 IndexNewParamsConfigVectorizeIndexPresetConfigurationPreset = "openai/text-embedding-ada-002" IndexNewParamsConfigVectorizeIndexPresetConfigurationPresetCohereEmbedMultilingualV2_0 IndexNewParamsConfigVectorizeIndexPresetConfigurationPreset = "cohere/embed-multilingual-v2.0" )
func (IndexNewParamsConfigVectorizeIndexPresetConfigurationPreset) IsKnown ¶
func (r IndexNewParamsConfigVectorizeIndexPresetConfigurationPreset) IsKnown() bool
type IndexNewResponseEnvelope ¶
type IndexNewResponseEnvelope struct { Errors []IndexNewResponseEnvelopeErrors `json:"errors,required"` Messages []IndexNewResponseEnvelopeMessages `json:"messages,required"` Result VectorizeCreateIndex `json:"result,required,nullable"` // Whether the API call was successful Success IndexNewResponseEnvelopeSuccess `json:"success,required"` JSON indexNewResponseEnvelopeJSON `json:"-"` }
func (*IndexNewResponseEnvelope) UnmarshalJSON ¶
func (r *IndexNewResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type IndexNewResponseEnvelopeErrors ¶
type IndexNewResponseEnvelopeErrors struct { Code int64 `json:"code,required"` Message string `json:"message,required"` JSON indexNewResponseEnvelopeErrorsJSON `json:"-"` }
func (*IndexNewResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *IndexNewResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type IndexNewResponseEnvelopeMessages ¶
type IndexNewResponseEnvelopeMessages struct { Code int64 `json:"code,required"` Message string `json:"message,required"` JSON indexNewResponseEnvelopeMessagesJSON `json:"-"` }
func (*IndexNewResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *IndexNewResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type IndexNewResponseEnvelopeSuccess ¶
type IndexNewResponseEnvelopeSuccess bool
Whether the API call was successful
const (
IndexNewResponseEnvelopeSuccessTrue IndexNewResponseEnvelopeSuccess = true
)
func (IndexNewResponseEnvelopeSuccess) IsKnown ¶
func (r IndexNewResponseEnvelopeSuccess) IsKnown() bool
type IndexQueryParams ¶
type IndexQueryParams struct { // Whether to return the metadata associated with the closest vectors. ReturnMetadata param.Field[bool] `json:"returnMetadata"` // Whether to return the values associated with the closest vectors. ReturnValues param.Field[bool] `json:"returnValues"` // The number of nearest neighbors to find. TopK param.Field[float64] `json:"topK"` // The search vector that will be used to find the nearest neighbors. Vector param.Field[[]float64] `json:"vector"` }
func (IndexQueryParams) MarshalJSON ¶
func (r IndexQueryParams) MarshalJSON() (data []byte, err error)
type IndexQueryResponseEnvelope ¶
type IndexQueryResponseEnvelope struct { Errors []IndexQueryResponseEnvelopeErrors `json:"errors,required"` Messages []IndexQueryResponseEnvelopeMessages `json:"messages,required"` Result VectorizeIndexQuery `json:"result,required,nullable"` // Whether the API call was successful Success IndexQueryResponseEnvelopeSuccess `json:"success,required"` JSON indexQueryResponseEnvelopeJSON `json:"-"` }
func (*IndexQueryResponseEnvelope) UnmarshalJSON ¶
func (r *IndexQueryResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type IndexQueryResponseEnvelopeErrors ¶
type IndexQueryResponseEnvelopeErrors struct { Code int64 `json:"code,required"` Message string `json:"message,required"` JSON indexQueryResponseEnvelopeErrorsJSON `json:"-"` }
func (*IndexQueryResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *IndexQueryResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type IndexQueryResponseEnvelopeMessages ¶
type IndexQueryResponseEnvelopeMessages struct { Code int64 `json:"code,required"` Message string `json:"message,required"` JSON indexQueryResponseEnvelopeMessagesJSON `json:"-"` }
func (*IndexQueryResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *IndexQueryResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type IndexQueryResponseEnvelopeSuccess ¶
type IndexQueryResponseEnvelopeSuccess bool
Whether the API call was successful
const (
IndexQueryResponseEnvelopeSuccessTrue IndexQueryResponseEnvelopeSuccess = true
)
func (IndexQueryResponseEnvelopeSuccess) IsKnown ¶
func (r IndexQueryResponseEnvelopeSuccess) IsKnown() bool
type IndexService ¶
type IndexService struct {
Options []option.RequestOption
}
IndexService contains methods and other services that help with interacting with the cloudflare API. Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewIndexService method instead.
func NewIndexService ¶
func NewIndexService(opts ...option.RequestOption) (r *IndexService)
NewIndexService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*IndexService) Delete ¶
func (r *IndexService) Delete(ctx context.Context, accountIdentifier string, indexName string, opts ...option.RequestOption) (res *IndexDeleteResponse, err error)
Deletes the specified Vectorize Index.
func (*IndexService) DeleteByIDs ¶
func (r *IndexService) DeleteByIDs(ctx context.Context, accountIdentifier string, indexName string, body IndexDeleteByIDsParams, opts ...option.RequestOption) (res *VectorizeIndexDeleteVectorsByID, err error)
Delete a set of vectors from an index by their vector identifiers.
func (*IndexService) Get ¶
func (r *IndexService) Get(ctx context.Context, accountIdentifier string, indexName string, opts ...option.RequestOption) (res *VectorizeCreateIndex, err error)
Returns the specified Vectorize Index.
func (*IndexService) GetByIDs ¶
func (r *IndexService) GetByIDs(ctx context.Context, accountIdentifier string, indexName string, body IndexGetByIDsParams, opts ...option.RequestOption) (res *IndexGetByIDsResponse, err error)
Get a set of vectors from an index by their vector identifiers.
func (*IndexService) Insert ¶
func (r *IndexService) Insert(ctx context.Context, accountIdentifier string, indexName string, opts ...option.RequestOption) (res *VectorizeIndexInsert, err error)
Inserts vectors into the specified index and returns the count of the vectors successfully inserted.
func (*IndexService) List ¶
func (r *IndexService) List(ctx context.Context, accountIdentifier string, opts ...option.RequestOption) (res *[]VectorizeCreateIndex, err error)
Returns a list of Vectorize Indexes
func (*IndexService) New ¶
func (r *IndexService) New(ctx context.Context, accountIdentifier string, body IndexNewParams, opts ...option.RequestOption) (res *VectorizeCreateIndex, err error)
Creates and returns a new Vectorize Index.
func (*IndexService) Query ¶
func (r *IndexService) Query(ctx context.Context, accountIdentifier string, indexName string, body IndexQueryParams, opts ...option.RequestOption) (res *VectorizeIndexQuery, err error)
Finds vectors closest to a given vector in an index.
func (*IndexService) Update ¶
func (r *IndexService) Update(ctx context.Context, accountIdentifier string, indexName string, body IndexUpdateParams, opts ...option.RequestOption) (res *VectorizeCreateIndex, err error)
Updates and returns the specified Vectorize Index.
func (*IndexService) Upsert ¶
func (r *IndexService) Upsert(ctx context.Context, accountIdentifier string, indexName string, opts ...option.RequestOption) (res *VectorizeIndexUpsert, err error)
Upserts vectors into the specified index, creating them if they do not exist and returns the count of values and ids successfully inserted.
type IndexUpdateParams ¶
type IndexUpdateParams struct { // Specifies the description of the index. Description param.Field[string] `json:"description,required"` }
func (IndexUpdateParams) MarshalJSON ¶
func (r IndexUpdateParams) MarshalJSON() (data []byte, err error)
type IndexUpdateResponseEnvelope ¶
type IndexUpdateResponseEnvelope struct { Errors []IndexUpdateResponseEnvelopeErrors `json:"errors,required"` Messages []IndexUpdateResponseEnvelopeMessages `json:"messages,required"` Result VectorizeCreateIndex `json:"result,required,nullable"` // Whether the API call was successful Success IndexUpdateResponseEnvelopeSuccess `json:"success,required"` JSON indexUpdateResponseEnvelopeJSON `json:"-"` }
func (*IndexUpdateResponseEnvelope) UnmarshalJSON ¶
func (r *IndexUpdateResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type IndexUpdateResponseEnvelopeErrors ¶
type IndexUpdateResponseEnvelopeErrors struct { Code int64 `json:"code,required"` Message string `json:"message,required"` JSON indexUpdateResponseEnvelopeErrorsJSON `json:"-"` }
func (*IndexUpdateResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *IndexUpdateResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type IndexUpdateResponseEnvelopeMessages ¶
type IndexUpdateResponseEnvelopeMessages struct { Code int64 `json:"code,required"` Message string `json:"message,required"` JSON indexUpdateResponseEnvelopeMessagesJSON `json:"-"` }
func (*IndexUpdateResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *IndexUpdateResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type IndexUpdateResponseEnvelopeSuccess ¶
type IndexUpdateResponseEnvelopeSuccess bool
Whether the API call was successful
const (
IndexUpdateResponseEnvelopeSuccessTrue IndexUpdateResponseEnvelopeSuccess = true
)
func (IndexUpdateResponseEnvelopeSuccess) IsKnown ¶
func (r IndexUpdateResponseEnvelopeSuccess) IsKnown() bool
type IndexUpsertResponseEnvelope ¶
type IndexUpsertResponseEnvelope struct { Errors []IndexUpsertResponseEnvelopeErrors `json:"errors,required"` Messages []IndexUpsertResponseEnvelopeMessages `json:"messages,required"` Result VectorizeIndexUpsert `json:"result,required,nullable"` // Whether the API call was successful Success IndexUpsertResponseEnvelopeSuccess `json:"success,required"` JSON indexUpsertResponseEnvelopeJSON `json:"-"` }
func (*IndexUpsertResponseEnvelope) UnmarshalJSON ¶
func (r *IndexUpsertResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type IndexUpsertResponseEnvelopeErrors ¶
type IndexUpsertResponseEnvelopeErrors struct { Code int64 `json:"code,required"` Message string `json:"message,required"` JSON indexUpsertResponseEnvelopeErrorsJSON `json:"-"` }
func (*IndexUpsertResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *IndexUpsertResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type IndexUpsertResponseEnvelopeMessages ¶
type IndexUpsertResponseEnvelopeMessages struct { Code int64 `json:"code,required"` Message string `json:"message,required"` JSON indexUpsertResponseEnvelopeMessagesJSON `json:"-"` }
func (*IndexUpsertResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *IndexUpsertResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type IndexUpsertResponseEnvelopeSuccess ¶
type IndexUpsertResponseEnvelopeSuccess bool
Whether the API call was successful
const (
IndexUpsertResponseEnvelopeSuccessTrue IndexUpsertResponseEnvelopeSuccess = true
)
func (IndexUpsertResponseEnvelopeSuccess) IsKnown ¶
func (r IndexUpsertResponseEnvelopeSuccess) IsKnown() bool
type VectorizeCreateIndex ¶
type VectorizeCreateIndex struct { Config VectorizeCreateIndexConfig `json:"config"` // Specifies the timestamp the resource was created as an ISO8601 string. CreatedOn interface{} `json:"created_on"` // Specifies the description of the index. Description string `json:"description"` // Specifies the timestamp the resource was modified as an ISO8601 string. ModifiedOn interface{} `json:"modified_on"` Name string `json:"name"` JSON vectorizeCreateIndexJSON `json:"-"` }
func (*VectorizeCreateIndex) UnmarshalJSON ¶
func (r *VectorizeCreateIndex) UnmarshalJSON(data []byte) (err error)
type VectorizeCreateIndexConfig ¶
type VectorizeCreateIndexConfig struct { // Specifies the number of dimensions for the index Dimensions int64 `json:"dimensions,required"` // Specifies the type of metric to use calculating distance. Metric VectorizeCreateIndexConfigMetric `json:"metric,required"` JSON vectorizeCreateIndexConfigJSON `json:"-"` }
func (*VectorizeCreateIndexConfig) UnmarshalJSON ¶
func (r *VectorizeCreateIndexConfig) UnmarshalJSON(data []byte) (err error)
type VectorizeCreateIndexConfigMetric ¶
type VectorizeCreateIndexConfigMetric string
Specifies the type of metric to use calculating distance.
const ( VectorizeCreateIndexConfigMetricCosine VectorizeCreateIndexConfigMetric = "cosine" VectorizeCreateIndexConfigMetricEuclidean VectorizeCreateIndexConfigMetric = "euclidean" VectorizeCreateIndexConfigMetricDotProduct VectorizeCreateIndexConfigMetric = "dot-product" )
func (VectorizeCreateIndexConfigMetric) IsKnown ¶
func (r VectorizeCreateIndexConfigMetric) IsKnown() bool
type VectorizeIndexDeleteVectorsByID ¶
type VectorizeIndexDeleteVectorsByID struct { // The count of the vectors successfully deleted. Count int64 `json:"count"` // Array of vector identifiers of the vectors that were successfully processed for // deletion. IDs []string `json:"ids"` JSON vectorizeIndexDeleteVectorsByIDJSON `json:"-"` }
func (*VectorizeIndexDeleteVectorsByID) UnmarshalJSON ¶
func (r *VectorizeIndexDeleteVectorsByID) UnmarshalJSON(data []byte) (err error)
type VectorizeIndexInsert ¶
type VectorizeIndexInsert struct { // Specifies the count of the vectors successfully inserted. Count int64 `json:"count"` // Array of vector identifiers of the vectors successfully inserted. IDs []string `json:"ids"` JSON vectorizeIndexInsertJSON `json:"-"` }
func (*VectorizeIndexInsert) UnmarshalJSON ¶
func (r *VectorizeIndexInsert) UnmarshalJSON(data []byte) (err error)
type VectorizeIndexQuery ¶
type VectorizeIndexQuery struct { // Specifies the count of vectors returned by the search Count int64 `json:"count"` // Array of vectors matched by the search Matches []VectorizeIndexQueryMatch `json:"matches"` JSON vectorizeIndexQueryJSON `json:"-"` }
func (*VectorizeIndexQuery) UnmarshalJSON ¶
func (r *VectorizeIndexQuery) UnmarshalJSON(data []byte) (err error)
type VectorizeIndexQueryMatch ¶
type VectorizeIndexQueryMatch struct { // Identifier ID string `json:"id"` Metadata interface{} `json:"metadata"` // The score of the vector according to the index's distance metric Score float64 `json:"score"` Values []float64 `json:"values"` JSON vectorizeIndexQueryMatchJSON `json:"-"` }
func (*VectorizeIndexQueryMatch) UnmarshalJSON ¶
func (r *VectorizeIndexQueryMatch) UnmarshalJSON(data []byte) (err error)
type VectorizeIndexUpsert ¶
type VectorizeIndexUpsert struct { // Specifies the count of the vectors successfully inserted. Count int64 `json:"count"` // Array of vector identifiers of the vectors successfully inserted. IDs []string `json:"ids"` JSON vectorizeIndexUpsertJSON `json:"-"` }
func (*VectorizeIndexUpsert) UnmarshalJSON ¶
func (r *VectorizeIndexUpsert) UnmarshalJSON(data []byte) (err error)
type VectorizeService ¶
type VectorizeService struct { Options []option.RequestOption Indexes *IndexService }
VectorizeService contains methods and other services that help with interacting with the cloudflare API. Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewVectorizeService method instead.
func NewVectorizeService ¶
func NewVectorizeService(opts ...option.RequestOption) (r *VectorizeService)
NewVectorizeService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.