provider

package
v0.0.0-...-dd796f5 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const ProviderNotImplemented = ProviderName("not_implemented")

The not implemented provider name

View Source
const ProviderUnofficialDuckDuckGo = ProviderName("unofficial_duckduckgo")

The unofficial DuckDuckGo provider name

View Source
const ProviderUnofficialQwant = ProviderName("unofficial_qwant")

The Unofficial Qwant provider name

Variables

This section is empty.

Functions

This section is empty.

Types

type NotImplemented

type NotImplemented struct{}

The not implemented web search provider

func NewNotImplemented

func NewNotImplemented(config ...NotImplementedConfig) NotImplemented

Makes a new not implemented web search provider

func (NotImplemented) Name

func (engine NotImplemented) Name() ProviderName

Returns provider name

func (NotImplemented) Search

func (engine NotImplemented) Search(query string, count int) (Results, error)

Makes web search

type NotImplementedConfig

type NotImplementedConfig struct{}

The config for not implemented provider

type Provider

type Provider interface {
	Search(query string, count int) (Results, error) // < The main search method with search query
	Name() ProviderName                              // < The provider name
}

The provider's interface

type ProviderName

type ProviderName string

The name of web search provider

type Result

type Result struct {
	Title       string
	Description string
	Link        url.URL
	Provider    ProviderName
}

The web search result entry

type Results

type Results []Result

The web search result entries

type UnofficialDuckDuckGo

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

The unofficial DuckDuckGo web search provider

func NewUnofficialDuckDuckGo

func NewUnofficialDuckDuckGo(config ...UnofficialDuckDuckGoConfig) UnofficialDuckDuckGo

Makes a new unofficial DuckDuckGo web search provider

func (UnofficialDuckDuckGo) Name

func (engine UnofficialDuckDuckGo) Name() ProviderName

Returns provider name

func (UnofficialDuckDuckGo) Search

func (engine UnofficialDuckDuckGo) Search(query string, count int) (Results, error)

Makes web search

type UnofficialDuckDuckGoConfig

type UnofficialDuckDuckGoConfig struct{}

The config for unofficial DuckDuckGo provider

type UnofficialQwant

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

The Unofficial Qwant [https://qwant.com] web search provider

func NewUnofficialQwant

func NewUnofficialQwant(config ...UnofficialQwantConfig) UnofficialQwant

Makes a new Unofficial Qwant web search provider

func (UnofficialQwant) Name

func (engine UnofficialQwant) Name() ProviderName

Returns provider name

func (UnofficialQwant) Search

func (engine UnofficialQwant) Search(query string, count int) (Results, error)

Makes web search

type UnofficialQwantConfig

type UnofficialQwantConfig struct {
	Locale string
}

The config for Unofficial Qwant provider

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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