addHandle is an internal method to add a handler
(method string, handler Handler)
| 76 | |
| 77 | // addHandle is an internal method to add a handler |
| 78 | func (k *Kite) addHandle(method string, handler Handler) *Method { |
| 79 | authenticate := true |
| 80 | if k.Config.DisableAuthentication { |
| 81 | authenticate = false |
| 82 | } |
| 83 | |
| 84 | m := &Method{ |
| 85 | name: method, |
| 86 | handler: handler, |
| 87 | authenticate: authenticate, |
| 88 | handling: k.MethodHandling, |
| 89 | } |
| 90 | |
| 91 | k.handlers[method] = m |
| 92 | return m |
| 93 | } |
| 94 | |
| 95 | // DisableAuthentication disables authentication check for this method. |
| 96 | func (m *Method) DisableAuthentication() *Method { |
no outgoing calls
no test coverage detected