HandlerFor gets a http.Handler for the provided operation method and path
(method, path string)
| 707 | |
| 708 | // HandlerFor gets a http.Handler for the provided operation method and path |
| 709 | func (o *CiliumAPIAPI) HandlerFor(method, path string) (http.Handler, bool) { |
| 710 | if o.handlers == nil { |
| 711 | return nil, false |
| 712 | } |
| 713 | um := strings.ToUpper(method) |
| 714 | if _, ok := o.handlers[um]; !ok { |
| 715 | return nil, false |
| 716 | } |
| 717 | if path == "/" { |
| 718 | path = "" |
| 719 | } |
| 720 | h, ok := o.handlers[um][path] |
| 721 | return h, ok |
| 722 | } |
| 723 | |
| 724 | // Context returns the middleware context for the cilium API API |
| 725 | func (o *CiliumAPIAPI) Context() *middleware.Context { |
no outgoing calls
no test coverage detected