Documentation ¶
Index ¶
- func HandleHttpErrors(writer http.ResponseWriter, err error)
- func Render() *render.Render
- func RequestToJsonObject(req *http.Request, jsonDoc interface{}) error
- func RouterWrap(f func(http.ResponseWriter, *http.Request)) func(http.ResponseWriter, *http.Request, httprouter.Params)
- type ErrJsonMarshalling
- type ItemsResponse
- type ItemsRoute
- type ScraperRoute
- func (route *ScraperRoute) Log(w http.ResponseWriter, r *http.Request, params httprouter.Params)
- func (route *ScraperRoute) Scrap(w http.ResponseWriter, r *http.Request, params httprouter.Params)
- func (route *ScraperRoute) Selector(w http.ResponseWriter, r *http.Request, params httprouter.Params)
- func (route *ScraperRoute) StatusJob(w http.ResponseWriter, r *http.Request, params httprouter.Params)
- func (route *ScraperRoute) TestURL(w http.ResponseWriter, r *http.Request, params httprouter.Params)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HandleHttpErrors ¶
func HandleHttpErrors(writer http.ResponseWriter, err error)
func RequestToJsonObject ¶
func RouterWrap ¶
func RouterWrap(f func(http.ResponseWriter, *http.Request)) func(http.ResponseWriter, *http.Request, httprouter.Params)
Types ¶
type ErrJsonMarshalling ¶
type ErrJsonMarshalling struct {
// contains filtered or unexported fields
}
func (ErrJsonMarshalling) Error ¶
func (e ErrJsonMarshalling) Error() string
type ItemsResponse ¶
type ItemsRoute ¶
type ItemsRoute struct {
// contains filtered or unexported fields
}
func NewItemsRoute ¶
func NewItemsRoute(index string) *ItemsRoute
func (*ItemsRoute) Get ¶
func (r *ItemsRoute) Get(w http.ResponseWriter, req *http.Request, params httprouter.Params)
func (*ItemsRoute) MultiGet ¶
func (r *ItemsRoute) MultiGet(w http.ResponseWriter, req *http.Request, params httprouter.Params)
func (*ItemsRoute) Search ¶
func (r *ItemsRoute) Search(w http.ResponseWriter, req *http.Request, params httprouter.Params)
type ScraperRoute ¶
type ScraperRoute struct {
// contains filtered or unexported fields
}
func NewScraperRoute ¶
func NewScraperRoute(index string) *ScraperRoute
func (*ScraperRoute) Log ¶
func (route *ScraperRoute) Log(w http.ResponseWriter, r *http.Request, params httprouter.Params)
func (*ScraperRoute) Scrap ¶
func (route *ScraperRoute) Scrap(w http.ResponseWriter, r *http.Request, params httprouter.Params)
func (*ScraperRoute) Selector ¶
func (route *ScraperRoute) Selector(w http.ResponseWriter, r *http.Request, params httprouter.Params)
func (*ScraperRoute) StatusJob ¶
func (route *ScraperRoute) StatusJob(w http.ResponseWriter, r *http.Request, params httprouter.Params)
func (*ScraperRoute) TestURL ¶
func (route *ScraperRoute) TestURL(w http.ResponseWriter, r *http.Request, params httprouter.Params)
Click to show internal directories.
Click to hide internal directories.