data

package
v3.0.0-...-e1d3755 Latest Latest
Warning

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

Go to latest
Published: May 20, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API struct {
	// contains filtered or unexported fields
}

func New

func New(con *connection.Connection) *API

func (*API) Creator

func (data *API) Creator() *Creator

func (*API) Deleter

func (data *API) Deleter() *Deleter

func (*API) Query

func (data *API) Query() *Query

func (*API) Searcher

func (data *API) Searcher() *Searcher

type Creator

type Creator struct {
	// contains filtered or unexported fields
}

func (*Creator) Do

func (creator *Creator) Do(ctx context.Context) (*DocWrapper, error)

func (*Creator) PayloadDoc

func (creator *Creator) PayloadDoc() (*models.Docs, error)

func (*Creator) WithDBName

func (creator *Creator) WithDBName(name string) *Creator

func (*Creator) WithDocs

func (creator *Creator) WithDocs(documents []interface{}) *Creator

func (*Creator) WithSpaceName

func (creator *Creator) WithSpaceName(name string) *Creator

type DeleteResultDocs

type DeleteResultDocs struct {
	Code int     `json:"code"`
	Msg  *string `json:"msg,omitempty"`
	Data struct {
		Total        int      `json:"total"`
		DocumentsIDs []string `json:"document_ids"`
	} `json:"data"`
}

type DeleteWrapper

type DeleteWrapper struct {
	Docs *DeleteResultDocs
}

type Deleter

type Deleter struct {
	// contains filtered or unexported fields
}

func (*Deleter) Do

func (query *Deleter) Do(ctx context.Context) (*DeleteWrapper, error)

func (*Deleter) PayloadDoc

func (query *Deleter) PayloadDoc() (*models.DeleteRequest, error)

func (*Deleter) WithDBName

func (delete *Deleter) WithDBName(name string) *Deleter

func (*Deleter) WithFilters

func (delete *Deleter) WithFilters(filters *models.Filters) *Deleter

func (*Deleter) WithIDs

func (delete *Deleter) WithIDs(ids []string) *Deleter

func (*Deleter) WithSpaceName

func (delete *Deleter) WithSpaceName(name string) *Deleter

type DocWrapper

type DocWrapper struct {
	Docs *ResultDocs
}

type Query

type Query struct {
	// contains filtered or unexported fields
}

func (*Query) Do

func (query *Query) Do(ctx context.Context) (*QueryWrapper, error)

func (*Query) PayloadDoc

func (query *Query) PayloadDoc() (*models.QueryRequest, error)

func (*Query) WithDBName

func (query *Query) WithDBName(name string) *Query

func (*Query) WithFilters

func (query *Query) WithFilters(filters *models.Filters) *Query

func (*Query) WithIDs

func (query *Query) WithIDs(ids []string) *Query

func (*Query) WithSpaceName

func (query *Query) WithSpaceName(name string) *Query

type QueryResultDocs

type QueryResultDocs struct {
	Code int     `json:"code"`
	Msg  *string `json:"msg,omitempty"`
	Data struct {
		Documents []interface{} `json:"documents"`
	} `json:"data"`
}

type QueryWrapper

type QueryWrapper struct {
	Docs *QueryResultDocs
}

type ResultDocs

type ResultDocs struct {
	Code int     `json:"code"`
	Msg  *string `json:"msg,omitempty"`
	Data struct {
		Total       int `json:"total"`
		DocumentIds []struct {
			ID string `json:"_id"`
		} `json:"document_ids"`
	} `json:"data"`
}

type SearchResultDocs

type SearchResultDocs struct {
	Code int     `json:"code"`
	Msg  *string `json:"msg,omitempty"`
	Data struct {
		Documents []interface{} `json:"documents"`
	} `json:"data"`
}

type SearchWrapper

type SearchWrapper struct {
	Docs *SearchResultDocs
}

type Searcher

type Searcher struct {
	// contains filtered or unexported fields
}

func (*Searcher) Do

func (searcher *Searcher) Do(ctx context.Context) (*SearchWrapper, error)

func (*Searcher) PayloadDoc

func (searcher *Searcher) PayloadDoc() (*models.SearchRequest, error)

func (*Searcher) WithDBName

func (searcher *Searcher) WithDBName(name string) *Searcher

func (*Searcher) WithFilters

func (searcher *Searcher) WithFilters(filters *models.Filters) *Searcher

func (*Searcher) WithLimit

func (searcher *Searcher) WithLimit(limit int) *Searcher

func (*Searcher) WithSpaceName

func (searcher *Searcher) WithSpaceName(name string) *Searcher

func (*Searcher) WithVectors

func (searcher *Searcher) WithVectors(vectors []models.Vector) *Searcher

Jump to

Keyboard shortcuts

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