Documentation ¶
Overview ¶
Package search provides search interface and functionality
Index ¶
- func Init(c conf.Config)
- func ParseGoto(gt string) int
- func ParseLimit(limit string) int
- func ParsePage(page string) int
- func ParseTimeout(timeout string) time.Duration
- func ProviderRegister(provider interface{}) error
- func Providers() []string
- type Provider
- type Query
- type Result
- type Results
- type Searcher
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseLimit ¶ added in v1.9.0
ParseLimit parses limit from a given string
func ParseTimeout ¶ added in v1.5.1
ParseTimeout parses timeout from a given string
func ProviderRegister ¶
func ProviderRegister(provider interface{}) error
ProviderRegister registers a search provider
Types ¶
type Provider ¶ added in v1.8.0
type Provider struct { Name string Title string Enabled bool Noui bool Priority int64 Rewrite string Searcher }
Provider represents a provider
func ProviderByName ¶ added in v1.8.0
ProviderByName returns a provider by the given name
type Query ¶ added in v1.5.0
type Query struct { Provider string Keyword string Limit int Page int Goto int Timeout time.Duration Start time.Time Elapsed time.Duration HTTPStatus int Results Results }
Query represents a search query
type Result ¶ added in v1.4.0
type Result struct { Link string `json:"link"` Title string `json:"title"` Description string `json:"description"` Date time.Time `json:"date"` From string `json:"from"` }
Result represents a search result
Click to show internal directories.
Click to hide internal directories.