mirror of
https://gitee.com/wanwujie/sub2api
synced 2026-05-06 06:00:44 +08:00
12 lines
337 B
Go
12 lines
337 B
Go
|
|
package websearch
|
||
|
|
|
||
|
|
import "context"
|
||
|
|
|
||
|
|
// Provider is the interface every search backend must implement.
|
||
|
|
type Provider interface {
|
||
|
|
// Name returns the provider identifier ("brave" or "tavily").
|
||
|
|
Name() string
|
||
|
|
// Search executes a web search and returns results.
|
||
|
|
Search(ctx context.Context, req SearchRequest) (*SearchResponse, error)
|
||
|
|
}
|