lib

package
v0.0.0-...-488f1a8 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatBytes

func FormatBytes(bytes int64) string

func PrintBanner

func PrintBanner()

func PrintCollectionHeader

func PrintCollectionHeader(name string, points int64)

func PrintDivider

func PrintDivider()

func PrintError

func PrintError(msg string)

func PrintInfo

func PrintInfo(msg string)

func PrintItem

func PrintItem(label string, value interface{})

func PrintSection

func PrintSection(title string)

func PrintSuccess

func PrintSuccess(msg string)

func PrintTableHeader

func PrintTableHeader(columns ...string)

func PrintTableRow

func PrintTableRow(values ...interface{})

func PrintTotal

func PrintTotal(label string, value interface{})

func PrintWarning

func PrintWarning(msg string)

Types

type ClusterInfo

type ClusterInfo struct {
	Status string `json:"status"`
	PeerId int64  `json:"peer_id"`
}

type CollectionDescription

type CollectionDescription struct {
	Name string `json:"name"`
}

type CollectionInfo

type CollectionInfo struct {
	Status          string `json:"status"`
	OptimizerStatus string `json:"optimizer_status"`
	VectorsCount    int64  `json:"vectors_count"`
	IndexedVectors  int64  `json:"indexed_vectors_count"`
	PointsCount     int64  `json:"points_count"`
	SegmentsCount   int    `json:"segments_count"`
	Config          struct {
		Params struct {
			Vectors interface{} `json:"vectors"`
		} `json:"params"`
	} `json:"config"`
	PayloadSchema map[string]interface{} `json:"payload_schema"`
}

type CollectionsList

type CollectionsList struct {
	Collections []CollectionDescription `json:"collections"`
}

type Condition

type Condition struct {
	Key   string      `json:"key,omitempty"`
	Match interface{} `json:"match,omitempty"`
}

type DumpCommand

type DumpCommand struct {
	Collection  string `required:"" short:"c" help:"Collection name (use '*' or 'all' for all collections)"`
	OutputFile  string `short:"o" help:"Output file (default: stdout)"`
	Limit       int    `short:"l" help:"Max documents to dump (0 = unlimited)" default:"0"`
	BatchSize   int    `short:"b" help:"Batch size for scrolling" default:"100"`
	WithVectors bool   `short:"v" help:"Include vectors in output" default:"false"`
	PayloadOnly bool   `short:"p" help:"Output only payload (no metadata)" default:"false"`
	NoProgress  bool   `help:"Disable progress bar" default:"false"`
	Quiet       bool   `short:"q" help:"Quiet mode (minimal output)" default:"false"`
}

func (*DumpCommand) Run

func (cmd *DumpCommand) Run(client *QdrantClient) error

type DumpPoint

type DumpPoint struct {
	Collection string                 `json:"_collection"`
	Id         interface{}            `json:"_id"`
	Payload    map[string]interface{} `json:"payload"`
	Vector     interface{}            `json:"vector,omitempty"`
}

type Filter

type Filter struct {
	Must    []Condition `json:"must,omitempty"`
	Should  []Condition `json:"should,omitempty"`
	MustNot []Condition `json:"must_not,omitempty"`
}

type ListCommand

type ListCommand struct {
	Verbose bool `short:"v" help:"Show detailed collection info"`
}

func (*ListCommand) Run

func (cmd *ListCommand) Run(client *QdrantClient) error

type Point

type Point struct {
	Id      interface{}            `json:"id"`
	Payload map[string]interface{} `json:"payload"`
	Vector  interface{}            `json:"vector,omitempty"`
}

type QdrantClient

type QdrantClient struct {
	BaseUrl   string
	LogOutput io.Writer
	ApiKey    string
}

func NewQdrantClient

func NewQdrantClient(baseUrl string) *QdrantClient

func (*QdrantClient) Request

func (c *QdrantClient) Request(method, path string, body interface{}, target interface{}) error

type QdrantResponse

type QdrantResponse[T any] struct {
	Result T       `json:"result"`
	Status string  `json:"status"`
	Time   float64 `json:"time"`
}

type ScrollRequest

type ScrollRequest struct {
	Limit       int     `json:"limit"`
	WithPayload bool    `json:"with_payload"`
	WithVector  bool    `json:"with_vector"`
	Offset      *string `json:"offset,omitempty"`
}

type ScrollResponse

type ScrollResponse struct {
	Points         []Point     `json:"points"`
	NextPageOffset interface{} `json:"next_page_offset"`
}

type SearchCommand

type SearchCommand struct {
	Collection string `required:"" short:"c" help:"Collection name"`
	Query      string `short:"q" help:"Text to search in payloads (searches all text fields)"`
	Field      string `short:"f" help:"Specific field to search in"`
	Limit      int    `short:"l" help:"Max results" default:"10"`
	Raw        bool   `short:"r" help:"Output raw JSON" default:"false"`
}

func (*SearchCommand) Run

func (cmd *SearchCommand) Run(client *QdrantClient) error

type SearchRequest

type SearchRequest struct {
	Vector      []float64 `json:"vector,omitempty"`
	Filter      *Filter   `json:"filter,omitempty"`
	Limit       int       `json:"limit"`
	WithPayload bool      `json:"with_payload"`
	WithVector  bool      `json:"with_vector"`
}

type StatsCommand

type StatsCommand struct{}

func (*StatsCommand) Run

func (cmd *StatsCommand) Run(client *QdrantClient) error

type TelemetryInfo

type TelemetryInfo struct {
	App struct {
		Name    string `json:"name"`
		Version string `json:"version"`
	} `json:"app"`
	Collections struct {
		NumberOfCollections int `json:"number_of_collections"`
	} `json:"collections"`
}

Jump to

Keyboard shortcuts

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