// Handle is the type's Handler function.
512039
func (h *localDevicesHandler) Handle(
	ctx types.Context,
	w http.ResponseWriter,
	req *http.Request,
	store types.Store) error {

	headers := req.Header[types.LocalDevicesHeader]
	ctx.WithField(types.LocalDevicesHeader, headers).Debug("http header")

	valMap := types.LocalDevicesMap{}
	for _, h := range headers {
		val := &types.LocalDevices{}
		if err := val.UnmarshalText([]byte(h)); err != nil {
			return err
		}
		valMap[strings.ToLower(val.Driver)] = val
	}

	ctx = ctx.WithValue(context.AllLocalDevicesKey, valMap)
	return h.handler(ctx, w, req, store)
}
1101951
func (fn GetPetByIDHandlerFunc) Handle(params GetPetByIDParams, principal interface{}) middleware.Responder {
	return fn(params, principal)
}
301961
func (r *Router) Handle(event string, h http.Handler) {
	r.routes[event] = h
}
179414
func (fn PetGetHandlerFunc) Handle(params PetGetParams, principal interface{}) middleware.Responder {
	return fn(params, principal)
}
1204292
func (eh guildCreateEventHandler) Handle(s *Session, i interface{}) {
	if t, ok := i.(*GuildCreate); ok {
		eh(s, t)
	}
}
286626
func (p *handler) Handle(event json.RawMessage, ctx *apex.Context) (interface{}, error) {
	proxyEvent := &Event{}

	err := json.Unmarshal(event, proxyEvent)
	if err != nil {
		return nil, fmt.Errorf("Parse proxy event: %s", err)
	}

	req, err := buildRequest(proxyEvent, ctx)
	if err != nil {
		return nil, fmt.Errorf("Build request: %s", err)
	}

	res := &ResponseWriter{}
	p.Handler.ServeHTTP(res, req)
	res.finish()

	return &res.response, nil
}
425739
func (h HandlerFunc) Handle(event json.RawMessage, ctx *Context) (interface{}, error) {
	return h(event, ctx)
}
558769
func (c *Container) Handle(pattern string, handler http.Handler) {
	c.ServeMux.Handle(pattern, handler)
}
830830
func (hdr *Handler) Handle(im *imageserver.Image, params imageserver.Params) (*imageserver.Image, error) {
	if im.Format != "gif" {
		return nil, &imageserver.ImageError{Message: fmt.Sprintf("image format is not gif: %s", im.Format)}
	}
	if !hdr.Processor.Change(params) {
		return im, nil
	}
	g, err := gif.DecodeAll(bytes.NewReader(im.Data))
	if err != nil {
		return nil, &imageserver.ImageError{Message: err.Error()}
	}
	g, err = hdr.Processor.Process(g, params)
	if err != nil {
		return nil, err
	}
	buf := new(bytes.Buffer)
	err = gif.EncodeAll(buf, g)
	if err != nil {
		return nil, &imageserver.ImageError{Message: err.Error()}
	}
	im = &imageserver.Image{
		Format: "gif",
		Data:   buf.Bytes(),
	}
	return im, nil
}
301083
func (m *Module) Handle(method, path string, h http.HandlerFunc) {
	m.HTTPRouter.Handle(method, path, func(rw http.ResponseWriter, req *http.Request, _ Params) {
		h(rw, req)
	})
}
65804
func (g *routeGroup) Handle(method string, path string, h http.HandlerFunc) {
	g.handle(method, path, h)
}
15537
func (h HandlerFunc) Handle(data json.RawMessage, ctx *apex.Context) (interface{}, error) {
	event, record := new(Event), new(Record)

	if err := json.Unmarshal(data, record); err != nil {
		return nil, err
	}

	if err := decode(record, event); err != nil {
		return nil, err
	}

	if err := h(event, ctx); err != nil {
		return nil, err
	}

	return event, nil
}
128720
func (g *routeGroup) Handle(method string, path string, h ...Handler) {
	g.handle(method, path, h)
}
343098
func (s *Subscription) Handle(es string, h HandlerFunc) error {
	if _, ok := validEvents[es]; !ok {
		return fmt.Errorf("unknown event: %s", es)
	}

	s.lock.Lock()
	s.handlers[es] = h
	s.lock.Unlock()
	return nil
}
1244678
func (s *APIGroupHandler) handle(req *restful.Request, resp *restful.Response) {
	s.ServeHTTP(resp.ResponseWriter, req.Request)
}
1259326
func (hdr *Handler) Handle(im *imageserver.Image, params imageserver.Params) (*imageserver.Image, error) {
	if !params.Has(param) {
		return im, nil
	}
	params, err := params.GetParams(param)
	if err != nil {
		return nil, err
	}
	if params.Empty() {
		return im, nil
	}
	im, err = hdr.handle(im, params)
	if err != nil {
		if err, ok := err.(*imageserver.ParamError); ok {
			err.Param = param + "." + err.Param
		}
		return nil, err
	}
	return im, nil
}
667067
func (r Rule) Handle(h events.Handler) Rule {
	return Rules{r, Handle(h)}.Eval
}