routes

package
v0.0.0-...-730425d Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2014 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandleHttpErrors

func HandleHttpErrors(writer http.ResponseWriter, err error)

func Render

func Render() *render.Render

func RequestToJsonObject

func RequestToJsonObject(req *http.Request, jsonDoc interface{}) error

Types

type ErrJsonMarshalling

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

func (ErrJsonMarshalling) Error

func (e ErrJsonMarshalling) Error() string

type ItemsResponse

type ItemsResponse struct {
	Items []model.Item `json:"items"`
}

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)

Jump to

Keyboard shortcuts

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