search

package
v0.0.5 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const MAX_TRIES = 4

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(opts ...Option) *Client

func (*Client) Search

func (c *Client) Search(ctx context.Context, req Request) (results Results, err error)

type Option

type Option func(*Client)

func WithService

func WithService(svc Service) Option

type Request

type Request struct {
	User       users.User
	Query      string
	NumResults int
}

type Results

type Results interface {
	Text(w io.Writer) error
}

type Service

type Service interface {
	Search(ctx context.Context, req Request) (results Results, err error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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