models

package
v0.7.3 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 License: MPL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewIndexPodSpec

func NewIndexPodSpec(ctx context.Context, spec *IndexPodSpecModel) (*pinecone.PodSpec, diag.Diagnostics)

func NewIndexServerlessSpec

func NewIndexServerlessSpec(spec *IndexServerlessSpecModel) *pinecone.ServerlessSpec

Types

type CollectionDataSourceModel

type CollectionDataSourceModel struct {
	Name      types.String `tfsdk:"name"`
	Size      types.Int64  `tfsdk:"size"`
	Status    types.String `tfsdk:"status"`
	Dimension types.Int64  `tfsdk:"dimension"`
	// VectorCount types.Int64  `tfsdk:"vector_count"`
	Environment types.String `tfsdk:"environment"`
	Id          types.String `tfsdk:"id"`
}

CollectionDataSourceModel describes the data source data model.

func (*CollectionDataSourceModel) Read

func (model *CollectionDataSourceModel) Read(collection *pinecone.Collection)

type CollectionModel

type CollectionModel struct {
	Name      types.String `tfsdk:"name"`
	Size      types.Int64  `tfsdk:"size"`
	Status    types.String `tfsdk:"status"`
	Dimension types.Int64  `tfsdk:"dimension"`
	// VectorCount types.Int64  `tfsdk:"vector_count"`
	Environment types.String `tfsdk:"environment"`
}

CollectionModel describes the collection data model.

func NewCollectionModel

func NewCollectionModel(collection *pinecone.Collection) *CollectionModel

type CollectionResourceModel

type CollectionResourceModel struct {
	Name      types.String `tfsdk:"name"`
	Size      types.Int64  `tfsdk:"size"`
	Status    types.String `tfsdk:"status"`
	Dimension types.Int64  `tfsdk:"dimension"`
	// VectorCount types.Int64    `tfsdk:"vector_count"`
	Environment types.String   `tfsdk:"environment"`
	Id          types.String   `tfsdk:"id"`
	Source      types.String   `tfsdk:"source"`
	Timeouts    timeouts.Value `tfsdk:"timeouts"`
}

CollectionResourceModel describes the resource data model.

func (*CollectionResourceModel) Read

func (model *CollectionResourceModel) Read(collection *pinecone.Collection)

type CollectionsDataSourceModel

type CollectionsDataSourceModel struct {
	Collections []CollectionModel `tfsdk:"collections"`
	Id          types.String      `tfsdk:"id"`
}

CollectionsDataSourceModel describes the data source data model.

type IndexDatasourceModel

type IndexDatasourceModel struct {
	Id        types.String `tfsdk:"id"`
	Name      types.String `tfsdk:"name"`
	Dimension types.Int64  `tfsdk:"dimension"`
	Metric    types.String `tfsdk:"metric"`
	Host      types.String `tfsdk:"host"`
	Spec      types.Object `tfsdk:"spec"`
	Status    types.Object `tfsdk:"status"`
}

IndexDatasourceeModel defined the Index model for the datasource.

func (*IndexDatasourceModel) Read

type IndexMetadataConfigModel

type IndexMetadataConfigModel struct {
	Indexed types.List `tfsdk:"indexed"`
}

func (IndexMetadataConfigModel) AttrTypes

func (metadataConfig IndexMetadataConfigModel) AttrTypes() map[string]attr.Type

type IndexModel

type IndexModel struct {
	Name      types.String `tfsdk:"name"`
	Dimension types.Int64  `tfsdk:"dimension"`
	Metric    types.String `tfsdk:"metric"`
	Host      types.String `tfsdk:"host"`
	Spec      types.Object `tfsdk:"spec"`
	Status    types.Object `tfsdk:"status"`
}

func (*IndexModel) Read

func (model *IndexModel) Read(ctx context.Context, index *pinecone.Index) diag.Diagnostics

type IndexPodSpecModel

type IndexPodSpecModel struct {
	Environment      types.String `tfsdk:"environment"`
	Replicas         types.Int64  `tfsdk:"replicas"`
	ShardCount       types.Int64  `tfsdk:"shards"`
	PodType          types.String `tfsdk:"pod_type"`
	PodCount         types.Int64  `tfsdk:"pods"`
	MetadataConfig   types.Object `tfsdk:"metadata_config"`
	SourceCollection types.String `tfsdk:"source_collection"`
}

func NewIndexPodSpecModel

func NewIndexPodSpecModel(ctx context.Context, spec *pinecone.PodSpec) (*IndexPodSpecModel, diag.Diagnostics)

func (IndexPodSpecModel) AttrTypes

func (model IndexPodSpecModel) AttrTypes() map[string]attr.Type

type IndexResourceModel

type IndexResourceModel struct {
	Id        types.String   `tfsdk:"id"`
	Name      types.String   `tfsdk:"name"`
	Dimension types.Int64    `tfsdk:"dimension"`
	Metric    types.String   `tfsdk:"metric"`
	Host      types.String   `tfsdk:"host"`
	Spec      types.Object   `tfsdk:"spec"`
	Status    types.Object   `tfsdk:"status"`
	Timeouts  timeouts.Value `tfsdk:"timeouts"`
}

IndexResourceModel defined the Index model for the resource.

func (*IndexResourceModel) Read

func (model *IndexResourceModel) Read(ctx context.Context, index *pinecone.Index) diag.Diagnostics

type IndexServerlessSpecModel

type IndexServerlessSpecModel struct {
	Cloud  types.String `tfsdk:"cloud"`
	Region types.String `tfsdk:"region"`
}

func NewIndexServerlessSpecModel

func NewIndexServerlessSpecModel(spec *pinecone.ServerlessSpec) *IndexServerlessSpecModel

func (IndexServerlessSpecModel) AttrTypes

func (model IndexServerlessSpecModel) AttrTypes() map[string]attr.Type

type IndexSpecModel

type IndexSpecModel struct {
	Pod        *IndexPodSpecModel        `tfsdk:"pod"`
	Serverless *IndexServerlessSpecModel `tfsdk:"serverless"`
}

func (IndexSpecModel) AttrTypes

func (model IndexSpecModel) AttrTypes() map[string]attr.Type

type IndexStatusModel

type IndexStatusModel struct {
	Ready types.Bool   `tfsdk:"ready"`
	State types.String `tfsdk:"state"`
}

func (IndexStatusModel) AttrTypes

func (status IndexStatusModel) AttrTypes() map[string]attr.Type

type IndexesDataSourceModel

type IndexesDataSourceModel struct {
	Indexes []IndexModel `tfsdk:"indexes"`
	Id      types.String `tfsdk:"id"`
}

Jump to

Keyboard shortcuts

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