jina

package
v0.62.0 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package jina integrates Jina Search and Jina Reader with the provider-neutral web contracts.

A Client implements both web.Searcher and web.Fetcher. The two capabilities have distinct upstream base URLs, configured through Config.SearchBaseURL and Config.FetchBaseURL, while sharing credentials and HTTP transport.

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 NewClient

func NewClient(ctx context.Context, config Config) (*Client, error)

func (*Client) Fetch

func (c *Client) Fetch(ctx context.Context, request *web.FetchRequest) (*web.FetchResponse, error)

func (*Client) Search

func (c *Client) Search(ctx context.Context, request *web.SearchRequest) (*web.SearchResponse, error)

type Config

type Config struct {
	APIKey        string
	SearchBaseURL string
	FetchBaseURL  string
	// Each endpoint owns its origin restriction; the host retains the shared client.
	HTTPClient *http.Client
}

Config configures a Client. APIKey is required. Jina serves search and fetch from different endpoints, so each has its own base URL; an empty one selects Jina's public endpoint. A nil HTTPClient selects a default client.

Jump to

Keyboard shortcuts

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