(pinned pluginruntime.PinnedEndpoint, task *model.Task, exists bool, err error)
| 1561 | } |
| 1562 | |
| 1563 | func pluginProtocolRetrieveDeps(pinned pluginruntime.PinnedEndpoint, task *model.Task, exists bool, err error) pluginProtocolBridgeDeps { |
| 1564 | deps := pluginProtocolTestDeps() |
| 1565 | deps.getByTaskId = func(userId int, taskId string) (*model.Task, bool, error) { |
| 1566 | if !exists { |
| 1567 | return nil, false, err |
| 1568 | } |
| 1569 | if task != nil && (userId != task.UserId || taskId != task.TaskID) { |
| 1570 | return nil, false, err |
| 1571 | } |
| 1572 | return task, task != nil, err |
| 1573 | } |
| 1574 | deps.resolvePlugin = func(constant.TaskPlatform) (*pluginruntime.LoadedPlugin, *pluginruntime.RoutingGeneration, bool) { |
| 1575 | if pinned.Plugin == nil { |
| 1576 | return nil, nil, false |
| 1577 | } |
| 1578 | return pinned.Plugin, pinned.Generation, true |
| 1579 | } |
| 1580 | return deps |
| 1581 | } |
no test coverage detected