Help us shape the future of Go! Take the 2026 Go Developer Survey

commons

package
v0.6.3 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteOffsetsCollection added in v0.4.2

func DeleteOffsetsCollection(ctx context.Context, migrationOffsetsCollectionName string, targetClient *qdrant.Client) error

func GetStartOffset

func GetStartOffset(ctx context.Context, migrationOffsetsCollectionName string, targetClient *qdrant.Client, sourceCollection string) (*qdrant.PointId, uint64, error)

func PrepareOffsetsCollection

func PrepareOffsetsCollection(ctx context.Context, migrationOffsetsCollectionName string, targetClient *qdrant.Client) error

func StoreStartOffset

func StoreStartOffset(ctx context.Context, migrationOffsetsCollectionName string, targetClient *qdrant.Client, sourceCollection string, offset *qdrant.PointId, offsetCount uint64) error

Types

type ChromaConfig

type ChromaConfig struct {
	Collection  string `required:"true" help:"Chroma collection name"`
	Url         string `help:"Chroma server URL" default:"http://localhost:8000"`
	Tenant      string `help:"Chroma tenant"`
	AuthType    string `help:"Authentication type" enum:"basic,token,none" default:"none"`
	Username    string `help:"Username for basic authentication"`
	Password    string `help:"Password for basic authentication"`
	Token       string `help:"Token for token authentication"`
	TokenHeader string `help:"Token header for authentication" default:"Authorization"`
	Database    string `help:"Database for Chroma"`
}

type ElasticsearchConfig added in v0.2.9

type ElasticsearchConfig struct {
	Url                string `help:"Elasticsearch URL" required:""`
	Index              string `help:"Elasticsearch index name" required:""`
	Username           string `help:"Elasticsearch username"`
	Password           string `help:"Elasticsearch password"`
	APIKey             string `help:"Elasticsearch API key"`
	InsecureSkipVerify bool   `help:"Skip TLS certificate verification" default:"false"`
}

type FaissConfig added in v0.2.8

type FaissConfig struct {
	IndexPath string `help:"Path to the FAISS index file" required:"true"`
}

type MigrationConfig

type MigrationConfig struct {
	BatchSize         int    `short:"b" help:"Batch size" default:"50"`
	Restart           bool   `help:"Restart the migration and do not continue from last offset" default:"false"`
	CreateCollection  bool   `short:"c" help:"Create the collection if it does not exist" default:"true"`
	OffsetsCollection string `help:"Collection to store the current migration offset" default:"_migration_offsets"`
	BatchDelay        int    `help:"Delay between batches in milliseconds (useful for rate limiting)" default:"0"`
}

type MilvusConfig

type MilvusConfig struct {
	Url           string   `help:"Source Milvus URL, e.g. https://your-milvus-hostname" required:"true"`
	Collection    string   `help:"Source collection" required:"true"`
	APIKey        string   `help:"Source API key"`
	EnableTLSAuth bool     `help:"Enable TLS Auth for Milvus" default:"false"`
	Username      string   `help:"Milvus username"`
	Password      string   `help:"Milvus password"`
	DBName        string   `help:"Milvus database name"`
	ServerVersion string   `help:"Milvus server version"`
	Partitions    []string `help:"Milvus partition names"`
}

type MongoDBConfig added in v0.2.3

type MongoDBConfig struct {
	Url        string `help:"MongoDB connection URL" required:""`
	Database   string `help:"MongoDB database name" required:""`
	Collection string `help:"MongoDB collection name" required:""`
}

type OpenSearchConfig added in v0.2.4

type OpenSearchConfig struct {
	Url                string `help:"OpenSearch URL" required:""`
	Index              string `help:"OpenSearch index name" required:""`
	Username           string `help:"OpenSearch username"`
	Password           string `help:"OpenSearch password"`
	APIKey             string `help:"OpenSearch API key"`
	InsecureSkipVerify bool   `help:"Skip TLS certificate verification" default:"false"`
}

type PGConfig added in v0.2.5

type PGConfig struct {
	Url       string   `help:"Postgres connection string (e.g., postgres://user:pass@host:port/dbname)." required:""`
	Table     string   `help:"Name of the table containing vector data." required:""`
	KeyColumn string   `help:"Column with unique values to be hashed as point IDs in Qdrant." required:""`
	Columns   []string `help:"Columns to migrate. Must include the key column. Defaults to all columns."`
}

type PineconeConfig

type PineconeConfig struct {
	IndexName   string `required:"true"  help:"Pinecone index name"`
	IndexHost   string `required:"true"  help:"Pinecone index host URL (e.g., https://example-index-12345.svc.region.pinecone.io)"`
	APIKey      string `required:"true"  help:"Pinecone API key for authentication"`
	Namespace   string `help:"Namespace of the partition to migrate"`
	ServiceHost string `help:"Pinecone service host URL. Optional."`
}

type QdrantConfig

type QdrantConfig struct {
	Collection string `help:"Collection name" required:"true"`
	Url        string `help:"Qdrant gRPC URL" default:"http://localhost:6334"`
	APIKey     string `help:"API key for authentication"`
}

type RedisConfig

type RedisConfig struct {
	Index      string `help:"Redis FT index name" required:"true"`
	Addr       string `help:"Redis address in the format host:port" default:"localhost:6379"`
	Protocol   int    `help:"Redis protocol version" default:"2"`
	Password   string `help:"Password to authenticate requests"`
	Username   string `help:"Username to authenticate requests"`
	ClientName string `help:"Will execute the 'CLIENT SETNAME <NAME>' for each connection"`
	DB         int    `help:"Database to be selected after connecting to the server"`
	Network    string `help:"Redis network type" enum:"tcp,unix" default:"tcp"`
}

type S3VectorsConfig added in v0.2.6

type S3VectorsConfig struct {
	Bucket string `help:"S3 Vectors bucket name" required:"true"`
	Index  string `help:"S3 Vectors index name" required:"true"`
}

type SolrConfig added in v0.5.2

type SolrConfig struct {
	Url                string `help:"Solr URL (e.g., http://localhost:8983)" required:""`
	Collection         string `help:"Solr collection name" required:""`
	Username           string `help:"Solr username for basic authentication"`
	Password           string `help:"Solr password for basic authentication"`
	InsecureSkipVerify bool   `help:"Skip TLS certificate verification" default:"false"`
}

type WeaviateConfig

type WeaviateConfig struct {
	Host         string   `help:"Host of the Weaviate instance (e.g. 'localhost:8080')" required:"true"`
	Scheme       string   `help:"Scheme of the Weaviate instance (e.g. 'http' or 'https')" default:"http"`
	ClassName    string   `help:"Name of the Weaviate class to migrate" required:"true"`
	AuthType     string   `enum:"none,apiKey,password,client,bearer" help:"Authentication type" default:"none"`
	APIKey       string   `help:"API key for authentication (when AuthType is 'apiKey')"`
	Username     string   `help:"Username for authentication (when AuthType is 'password')"`
	Password     string   `help:"Password for authentication (when AuthType is 'password')"`
	Scopes       []string `help:"Scopes for authentication (when AuthType is 'password' or 'client')"`
	ClientSecret string   `help:"Client secret for authentication (when AuthType is 'client')"`
	Token        string   `help:"Bearer token for authentication (when AuthType is 'bearer')"`
	RefreshToken string   `help:"Refresh token for authentication (when AuthType is 'bearer')"`
	ExpiresIn    uint     `help:"Access token expiration time (when AuthType is 'bearer')"`
	Tenant       string   `help:"Objects belonging to which tenant to migrate"`
}

Jump to

Keyboard shortcuts

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