searchrest

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2026 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Overview

Package searchrest contains HTTP transport helpers for REST-backed search plugins.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HTTPError

func HTTPError(status int, data []byte) error

Types

type Auth

type Auth struct {
	Header string
	Value  string
}

type Client

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

func New

func New(options Options) *Client

func (*Client) Close

func (c *Client) Close()

func (*Client) Do

func (c *Client) Do(ctx context.Context, method, path string, query url.Values, body any, out any) error

func (*Client) Raw

func (c *Client) Raw(ctx context.Context, method, path string, query url.Values, contentType string, body []byte) ([]byte, error)

type Options

type Options struct {
	Endpoint  string
	Auth      Auth
	TLSConfig *tls.Config
	Timeout   time.Duration
	Dialer    func(context.Context, string, string) (net.Conn, error)
}

Jump to

Keyboard shortcuts

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