LoadExtensionsForPath for returns extensions for specific path
(extensions []*schema.Extension, timeLimit time.Duration, timeLimits []*schema.PathEventTimeLimit, path string)
| 46 | |
| 47 | //LoadExtensionsForPath for returns extensions for specific path |
| 48 | func (env *Environment) LoadExtensionsForPath(extensions []*schema.Extension, timeLimit time.Duration, timeLimits []*schema.PathEventTimeLimit, path string) error { |
| 49 | for _, extension := range extensions { |
| 50 | if extension.Match(path) { |
| 51 | if extension.CodeType != "go" { |
| 52 | continue |
| 53 | } |
| 54 | code := extension.Code |
| 55 | callback := GetGoCallback(code) |
| 56 | if callback != nil { |
| 57 | env.goCallbacks = append(env.goCallbacks, callback) |
| 58 | } |
| 59 | } |
| 60 | } |
| 61 | return nil |
| 62 | } |
| 63 | |
| 64 | //HandleEvent handles event |
| 65 | func (env *Environment) HandleEvent(event string, context map[string]interface{}) (err error) { |
nothing calls this directly
no test coverage detected