azure

package
v0.0.0-...-b7aeced Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2025 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func New

func New(url, namespace, token string, options ...Option) (*Client, error)

func (*Client) Delete

func (c *Client) Delete(ctx context.Context, ids ...string) error

func (*Client) Index

func (c *Client) Index(ctx context.Context, documents ...index.Document) error

func (*Client) List

func (c *Client) List(ctx context.Context, options *index.ListOptions) (*index.Page[index.Document], error)

func (*Client) Query

func (c *Client) Query(ctx context.Context, query string, options *index.QueryOptions) ([]index.Result, error)

type Option

type Option func(*Client)

func WithClient

func WithClient(client *http.Client) Option

type Result

type Result map[string]any

func (Result) Content

func (r Result) Content() string

func (Result) ID

func (r Result) ID() string

func (Result) Map

func (r Result) Map(name string) map[string]string

func (Result) Metadata

func (r Result) Metadata() map[string]string

func (Result) Source

func (r Result) Source() string

func (Result) String

func (r Result) String(name string) string

func (Result) Title

func (r Result) Title() string

type Results

type Results struct {
	Value []Result `json:"value"`
}

Jump to

Keyboard shortcuts

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