Help us shape the future of Go! Take the 2026 Go Developer Survey

search

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SearchResponse

type SearchResponse struct {
	Results []SearchResult
	Total   int
}

SearchResponse contains search results

type SearchResult

type SearchResult struct {
	Title       string
	URL         string
	Snippet     string
	DisplayLink string
}

SearchResult represents a single search result

type Service

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

Service provides web search capabilities using metaserp

func NewService

func NewService(cfg *config.Config) (*Service, error)

NewService creates a new search service

func (*Service) Search

func (s *Service) Search(ctx context.Context, query string, numResults int) (*SearchResponse, error)

Search performs a web search for the given query

func (*Service) SearchForStatistics

func (s *Service) SearchForStatistics(ctx context.Context, topic string, numResults int) (*SearchResponse, error)

SearchForStatistics performs a search optimized for finding statistics

Jump to

Keyboard shortcuts

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