vectorize

package
v2.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 24, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const AuditLogActorTypeAdmin = shared.AuditLogActorTypeAdmin

This is an alias to an internal value.

View Source
const AuditLogActorTypeCloudflare = shared.AuditLogActorTypeCloudflare

This is an alias to an internal value.

View Source
const AuditLogActorTypeUser = shared.AuditLogActorTypeUser

This is an alias to an internal value.

View Source
const CloudflareTunnelTunTypeCNI = shared.CloudflareTunnelTunTypeCNI

This is an alias to an internal value.

View Source
const CloudflareTunnelTunTypeCfdTunnel = shared.CloudflareTunnelTunTypeCfdTunnel

This is an alias to an internal value.

View Source
const CloudflareTunnelTunTypeGRE = shared.CloudflareTunnelTunTypeGRE

This is an alias to an internal value.

View Source
const CloudflareTunnelTunTypeIPSec = shared.CloudflareTunnelTunTypeIPSec

This is an alias to an internal value.

View Source
const CloudflareTunnelTunTypeWARPConnector = shared.CloudflareTunnelTunTypeWARPConnector

This is an alias to an internal value.

Variables

This section is empty.

Functions

This section is empty.

Types

type ASN added in v2.1.0

type ASN = shared.ASN

This is an alias to an internal type.

type ASNParam added in v2.1.0

type ASNParam = shared.ASNParam

This is an alias to an internal type.

type AuditLog

type AuditLog = shared.AuditLog

This is an alias to an internal type.

type AuditLogAction

type AuditLogAction = shared.AuditLogAction

This is an alias to an internal type.

type AuditLogActor

type AuditLogActor = shared.AuditLogActor

This is an alias to an internal type.

type AuditLogActorType

type AuditLogActorType = shared.AuditLogActorType

The type of actor, whether a User, Cloudflare Admin, or an Automated System.

This is an alias to an internal type.

type AuditLogOwner

type AuditLogOwner = shared.AuditLogOwner

This is an alias to an internal type.

type AuditLogResource

type AuditLogResource = shared.AuditLogResource

This is an alias to an internal type.

type CloudflareTunnel

type CloudflareTunnel = shared.CloudflareTunnel

A Cloudflare Tunnel that connects your origin to Cloudflare's edge.

This is an alias to an internal type.

type CloudflareTunnelConnection

type CloudflareTunnelConnection = shared.CloudflareTunnelConnection

This is an alias to an internal type.

type CloudflareTunnelTunType

type CloudflareTunnelTunType = shared.CloudflareTunnelTunType

The type of tunnel.

This is an alias to an internal type.

type CreateIndex

type CreateIndex struct {
	Config IndexDimensionConfiguration `json:"config"`
	// Specifies the timestamp the resource was created as an ISO8601 string.
	CreatedOn string `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 string          `json:"modified_on"`
	Name       string          `json:"name"`
	JSON       createIndexJSON `json:"-"`
}

func (*CreateIndex) UnmarshalJSON

func (r *CreateIndex) UnmarshalJSON(data []byte) (err error)

type Error

type Error = apierror.Error

type ErrorData

type ErrorData = shared.ErrorData

This is an alias to an internal type.

type IndexDeleteByIDsParams

type IndexDeleteByIDsParams struct {
	// Identifier
	AccountID param.Field[string] `path:"account_id,required"`
	// 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   []shared.ResponseInfo  `json:"errors,required"`
	Messages []shared.ResponseInfo  `json:"messages,required"`
	Result   IndexDeleteVectorsByID `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 IndexDeleteByIDsResponseEnvelopeSuccess

type IndexDeleteByIDsResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	IndexDeleteByIDsResponseEnvelopeSuccessTrue IndexDeleteByIDsResponseEnvelopeSuccess = true
)

func (IndexDeleteByIDsResponseEnvelopeSuccess) IsKnown

type IndexDeleteParams added in v2.1.0

type IndexDeleteParams struct {
	// Identifier
	AccountID param.Field[string] `path:"account_id,required"`
}

type IndexDeleteResponseEnvelope

type IndexDeleteResponseEnvelope struct {
	Errors   []shared.ResponseInfo    `json:"errors,required"`
	Messages []shared.ResponseInfo    `json:"messages,required"`
	Result   IndexDeleteResponseUnion `json:"result,required"`
	// 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 IndexDeleteResponseEnvelopeSuccess

type IndexDeleteResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	IndexDeleteResponseEnvelopeSuccessTrue IndexDeleteResponseEnvelopeSuccess = true
)

func (IndexDeleteResponseEnvelopeSuccess) IsKnown

type IndexDeleteResponseUnion

type IndexDeleteResponseUnion interface {
	ImplementsVectorizeIndexDeleteResponseUnion()
}

Union satisfied by vectorize.IndexDeleteResponseUnknown or shared.UnionString.

type IndexDeleteVectorsByID

type IndexDeleteVectorsByID 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 indexDeleteVectorsByIDJSON `json:"-"`
}

func (*IndexDeleteVectorsByID) UnmarshalJSON

func (r *IndexDeleteVectorsByID) UnmarshalJSON(data []byte) (err error)

type IndexDimensionConfiguration

type IndexDimensionConfiguration struct {
	// Specifies the number of dimensions for the index
	Dimensions int64 `json:"dimensions,required"`
	// Specifies the type of metric to use calculating distance.
	Metric IndexDimensionConfigurationMetric `json:"metric,required"`
	JSON   indexDimensionConfigurationJSON   `json:"-"`
}

func (*IndexDimensionConfiguration) UnmarshalJSON

func (r *IndexDimensionConfiguration) UnmarshalJSON(data []byte) (err error)

type IndexDimensionConfigurationMetric

type IndexDimensionConfigurationMetric string

Specifies the type of metric to use calculating distance.

const (
	IndexDimensionConfigurationMetricCosine     IndexDimensionConfigurationMetric = "cosine"
	IndexDimensionConfigurationMetricEuclidean  IndexDimensionConfigurationMetric = "euclidean"
	IndexDimensionConfigurationMetricDotProduct IndexDimensionConfigurationMetric = "dot-product"
)

func (IndexDimensionConfigurationMetric) IsKnown

type IndexDimensionConfigurationParam

type IndexDimensionConfigurationParam 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[IndexDimensionConfigurationMetric] `json:"metric,required"`
}

func (IndexDimensionConfigurationParam) MarshalJSON

func (r IndexDimensionConfigurationParam) MarshalJSON() (data []byte, err error)

type IndexGetByIDsParams

type IndexGetByIDsParams struct {
	// Identifier
	AccountID param.Field[string] `path:"account_id,required"`
	// 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   []shared.ResponseInfo `json:"errors,required"`
	Messages []shared.ResponseInfo `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 IndexGetByIDsResponseEnvelopeSuccess

type IndexGetByIDsResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	IndexGetByIDsResponseEnvelopeSuccessTrue IndexGetByIDsResponseEnvelopeSuccess = true
)

func (IndexGetByIDsResponseEnvelopeSuccess) IsKnown

type IndexGetParams added in v2.1.0

type IndexGetParams struct {
	// Identifier
	AccountID param.Field[string] `path:"account_id,required"`
}

type IndexGetResponseEnvelope

type IndexGetResponseEnvelope struct {
	Errors   []shared.ResponseInfo `json:"errors,required"`
	Messages []shared.ResponseInfo `json:"messages,required"`
	Result   CreateIndex           `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 IndexGetResponseEnvelopeSuccess

type IndexGetResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	IndexGetResponseEnvelopeSuccessTrue IndexGetResponseEnvelopeSuccess = true
)

func (IndexGetResponseEnvelopeSuccess) IsKnown

type IndexInsert

type IndexInsert 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 indexInsertJSON `json:"-"`
}

func (*IndexInsert) UnmarshalJSON

func (r *IndexInsert) UnmarshalJSON(data []byte) (err error)

type IndexInsertParams

type IndexInsertParams struct {
	// Identifier
	AccountID param.Field[string] `path:"account_id,required"`
	Body      interface{}         `json:"body,required"`
}

func (IndexInsertParams) MarshalJSON

func (r IndexInsertParams) MarshalJSON() (data []byte, err error)

type IndexInsertResponseEnvelope

type IndexInsertResponseEnvelope struct {
	Errors   []shared.ResponseInfo `json:"errors,required"`
	Messages []shared.ResponseInfo `json:"messages,required"`
	Result   IndexInsert           `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 IndexInsertResponseEnvelopeSuccess

type IndexInsertResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	IndexInsertResponseEnvelopeSuccessTrue IndexInsertResponseEnvelopeSuccess = true
)

func (IndexInsertResponseEnvelopeSuccess) IsKnown

type IndexListParams added in v2.1.0

type IndexListParams struct {
	// Identifier
	AccountID param.Field[string] `path:"account_id,required"`
}

type IndexNewParams

type IndexNewParams struct {
	// Identifier
	AccountID param.Field[string] `path:"account_id,required"`
	// Specifies the type of configuration to use for the index.
	Config param.Field[IndexNewParamsConfigUnion] `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 struct {
	// Specifies the number of dimensions for the index
	Dimensions param.Field[int64] `json:"dimensions"`
	// Specifies the type of metric to use calculating distance.
	Metric param.Field[IndexNewParamsConfigMetric] `json:"metric"`
	// Specifies the preset to use for the index.
	Preset param.Field[IndexNewParamsConfigPreset] `json:"preset"`
}

Specifies the type of configuration to use for the index.

func (IndexNewParamsConfig) MarshalJSON

func (r IndexNewParamsConfig) MarshalJSON() (data []byte, err error)

type IndexNewParamsConfigMetric

type IndexNewParamsConfigMetric string

Specifies the type of metric to use calculating distance.

const (
	IndexNewParamsConfigMetricCosine     IndexNewParamsConfigMetric = "cosine"
	IndexNewParamsConfigMetricEuclidean  IndexNewParamsConfigMetric = "euclidean"
	IndexNewParamsConfigMetricDotProduct IndexNewParamsConfigMetric = "dot-product"
)

func (IndexNewParamsConfigMetric) IsKnown

func (r IndexNewParamsConfigMetric) IsKnown() bool

type IndexNewParamsConfigPreset

type IndexNewParamsConfigPreset string

Specifies the preset to use for the index.

const (
	IndexNewParamsConfigPresetCfBaaiBgeSmallEnV1_5        IndexNewParamsConfigPreset = "@cf/baai/bge-small-en-v1.5"
	IndexNewParamsConfigPresetCfBaaiBgeBaseEnV1_5         IndexNewParamsConfigPreset = "@cf/baai/bge-base-en-v1.5"
	IndexNewParamsConfigPresetCfBaaiBgeLargeEnV1_5        IndexNewParamsConfigPreset = "@cf/baai/bge-large-en-v1.5"
	IndexNewParamsConfigPresetOpenAITextEmbeddingAda002   IndexNewParamsConfigPreset = "openai/text-embedding-ada-002"
	IndexNewParamsConfigPresetCohereEmbedMultilingualV2_0 IndexNewParamsConfigPreset = "cohere/embed-multilingual-v2.0"
)

func (IndexNewParamsConfigPreset) IsKnown

func (r IndexNewParamsConfigPreset) IsKnown() bool

type IndexNewParamsConfigUnion

type IndexNewParamsConfigUnion interface {
	// contains filtered or unexported methods
}

Specifies the type of configuration to use for the index.

Satisfied by vectorize.IndexDimensionConfigurationParam, vectorize.IndexNewParamsConfigVectorizeIndexPresetConfiguration, IndexNewParamsConfig.

type IndexNewParamsConfigVectorizeIndexPresetConfiguration

type IndexNewParamsConfigVectorizeIndexPresetConfiguration struct {
	// Specifies the preset to use for the index.
	Preset param.Field[IndexNewParamsConfigVectorizeIndexPresetConfigurationPreset] `json:"preset,required"`
}

func (IndexNewParamsConfigVectorizeIndexPresetConfiguration) MarshalJSON

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

type IndexNewResponseEnvelope

type IndexNewResponseEnvelope struct {
	Errors   []shared.ResponseInfo `json:"errors,required"`
	Messages []shared.ResponseInfo `json:"messages,required"`
	Result   CreateIndex           `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 IndexNewResponseEnvelopeSuccess

type IndexNewResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	IndexNewResponseEnvelopeSuccessTrue IndexNewResponseEnvelopeSuccess = true
)

func (IndexNewResponseEnvelopeSuccess) IsKnown

type IndexQuery

type IndexQuery struct {
	// Specifies the count of vectors returned by the search
	Count int64 `json:"count"`
	// Array of vectors matched by the search
	Matches []IndexQueryMatch `json:"matches"`
	JSON    indexQueryJSON    `json:"-"`
}

func (*IndexQuery) UnmarshalJSON

func (r *IndexQuery) UnmarshalJSON(data []byte) (err error)

type IndexQueryMatch

type IndexQueryMatch struct {
	// Identifier
	ID       string      `json:"id"`
	Metadata interface{} `json:"metadata,nullable"`
	// The score of the vector according to the index's distance metric
	Score  float64             `json:"score"`
	Values []float64           `json:"values,nullable"`
	JSON   indexQueryMatchJSON `json:"-"`
}

func (*IndexQueryMatch) UnmarshalJSON

func (r *IndexQueryMatch) UnmarshalJSON(data []byte) (err error)

type IndexQueryParams

type IndexQueryParams struct {
	// Identifier
	AccountID param.Field[string] `path:"account_id,required"`
	// The search vector that will be used to find the nearest neighbors.
	Vector param.Field[[]float64] `json:"vector,required"`
	// A metadata filter expression used to limit nearest neighbor results.
	Filter param.Field[interface{}] `json:"filter"`
	// 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"`
}

func (IndexQueryParams) MarshalJSON

func (r IndexQueryParams) MarshalJSON() (data []byte, err error)

type IndexQueryResponseEnvelope

type IndexQueryResponseEnvelope struct {
	Errors   []shared.ResponseInfo `json:"errors,required"`
	Messages []shared.ResponseInfo `json:"messages,required"`
	Result   IndexQuery            `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 IndexQueryResponseEnvelopeSuccess

type IndexQueryResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	IndexQueryResponseEnvelopeSuccessTrue IndexQueryResponseEnvelopeSuccess = true
)

func (IndexQueryResponseEnvelopeSuccess) IsKnown

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, indexName string, body IndexDeleteParams, opts ...option.RequestOption) (res *IndexDeleteResponseUnion, err error)

Deletes the specified Vectorize Index.

func (*IndexService) DeleteByIDs

func (r *IndexService) DeleteByIDs(ctx context.Context, indexName string, params IndexDeleteByIDsParams, opts ...option.RequestOption) (res *IndexDeleteVectorsByID, err error)

Delete a set of vectors from an index by their vector identifiers.

func (*IndexService) Get

func (r *IndexService) Get(ctx context.Context, indexName string, query IndexGetParams, opts ...option.RequestOption) (res *CreateIndex, err error)

Returns the specified Vectorize Index.

func (*IndexService) GetByIDs

func (r *IndexService) GetByIDs(ctx context.Context, indexName string, params 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, indexName string, params IndexInsertParams, opts ...option.RequestOption) (res *IndexInsert, err error)

Inserts vectors into the specified index and returns the count of the vectors successfully inserted.

func (*IndexService) List

Returns a list of Vectorize Indexes

func (*IndexService) ListAutoPaging

Returns a list of Vectorize Indexes

func (*IndexService) New

func (r *IndexService) New(ctx context.Context, params IndexNewParams, opts ...option.RequestOption) (res *CreateIndex, err error)

Creates and returns a new Vectorize Index.

func (*IndexService) Query

func (r *IndexService) Query(ctx context.Context, indexName string, params IndexQueryParams, opts ...option.RequestOption) (res *IndexQuery, err error)

Finds vectors closest to a given vector in an index.

func (*IndexService) Update

func (r *IndexService) Update(ctx context.Context, indexName string, params IndexUpdateParams, opts ...option.RequestOption) (res *CreateIndex, err error)

Updates and returns the specified Vectorize Index.

func (*IndexService) Upsert

func (r *IndexService) Upsert(ctx context.Context, indexName string, params IndexUpsertParams, opts ...option.RequestOption) (res *IndexUpsert, 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 {
	// Identifier
	AccountID param.Field[string] `path:"account_id,required"`
	// 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   []shared.ResponseInfo `json:"errors,required"`
	Messages []shared.ResponseInfo `json:"messages,required"`
	Result   CreateIndex           `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 IndexUpdateResponseEnvelopeSuccess

type IndexUpdateResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	IndexUpdateResponseEnvelopeSuccessTrue IndexUpdateResponseEnvelopeSuccess = true
)

func (IndexUpdateResponseEnvelopeSuccess) IsKnown

type IndexUpsert

type IndexUpsert 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 indexUpsertJSON `json:"-"`
}

func (*IndexUpsert) UnmarshalJSON

func (r *IndexUpsert) UnmarshalJSON(data []byte) (err error)

type IndexUpsertParams

type IndexUpsertParams struct {
	// Identifier
	AccountID param.Field[string] `path:"account_id,required"`
	Body      interface{}         `json:"body,required"`
}

func (IndexUpsertParams) MarshalJSON

func (r IndexUpsertParams) MarshalJSON() (data []byte, err error)

type IndexUpsertResponseEnvelope

type IndexUpsertResponseEnvelope struct {
	Errors   []shared.ResponseInfo `json:"errors,required"`
	Messages []shared.ResponseInfo `json:"messages,required"`
	Result   IndexUpsert           `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 IndexUpsertResponseEnvelopeSuccess

type IndexUpsertResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	IndexUpsertResponseEnvelopeSuccessTrue IndexUpsertResponseEnvelopeSuccess = true
)

func (IndexUpsertResponseEnvelopeSuccess) IsKnown

type Member added in v2.1.0

type Member = shared.Member

This is an alias to an internal type.

type MemberParam added in v2.1.0

type MemberParam = shared.MemberParam

This is an alias to an internal type.

type MemberRole added in v2.1.0

type MemberRole = shared.MemberRole

This is an alias to an internal type.

type MemberRoleParam added in v2.1.0

type MemberRoleParam = shared.MemberRoleParam

This is an alias to an internal type.

type MemberRolesPermissions added in v2.1.0

type MemberRolesPermissions = shared.MemberRolesPermissions

This is an alias to an internal type.

type MemberRolesPermissionsParam added in v2.1.0

type MemberRolesPermissionsParam = shared.MemberRolesPermissionsParam

This is an alias to an internal type.

type MemberUser added in v2.1.0

type MemberUser = shared.MemberUser

This is an alias to an internal type.

type MemberUserParam added in v2.1.0

type MemberUserParam = shared.MemberUserParam

This is an alias to an internal type.

type Permission

type Permission = shared.Permission

This is an alias to an internal type.

type PermissionGrant

type PermissionGrant = shared.PermissionGrant

This is an alias to an internal type.

type PermissionGrantParam

type PermissionGrantParam = shared.PermissionGrantParam

This is an alias to an internal type.

type ResponseInfo

type ResponseInfo = shared.ResponseInfo

This is an alias to an internal type.

type Role

type Role = shared.Role

This is an alias to an internal type.

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL