Documentation ¶
Index ¶
- Constants
- func CreateIndex() (bleve.Index, error)
- type NotifyFile
- type Result
- type Search
- func (Search) CaddyModule() caddy.ModuleInfo
- func (sch *Search) IndexDoc(path string, remove bool)
- func (sch *Search) Provision(ctx caddy.Context) error
- func (sch *Search) Search(queryStr string) map[string][]string
- func (sch *Search) SearchHTML(w http.ResponseWriter, r *http.Request) error
- func (sch *Search) SearchJSON(w http.ResponseWriter, r *http.Request) error
- func (sch *Search) ServeHTTP(w http.ResponseWriter, r *http.Request, next caddyhttp.Handler) (err error)
- func (sch *Search) Validate() error
Constants ¶
View Source
const DirectiveName = "search"
Variables ¶
This section is empty.
Functions ¶
func CreateIndex ¶
func CreateIndex() (bleve.Index, error)
Types ¶
type NotifyFile ¶
type NotifyFile struct {
// contains filtered or unexported fields
}
func NewNotifyFile ¶
func NewNotifyFile(logger *zap.Logger, indexFunc func(path string, remove bool)) *NotifyFile
func (*NotifyFile) WatchEvent ¶
func (nf *NotifyFile) WatchEvent()
type Search ¶
type Search struct { Root string `json:"root,omitempty"` Endpoint string `json:"endpoint,omitempty"` // default: /search Regexp string `json:"regexp,omitempty"` // contains filtered or unexported fields }
func (Search) CaddyModule ¶
func (Search) CaddyModule() caddy.ModuleInfo
func (*Search) SearchHTML ¶
SearchHTML renders the search results in the HTML template
func (*Search) SearchJSON ¶
SearchJSON renders the search results in JSON format
Click to show internal directories.
Click to hide internal directories.