(pinned pluginruntime.PinnedEndpoint, task *model.Task, exists bool, err error)
| 1535 | } |
| 1536 | |
| 1537 | func pluginProtocolRetrieveDeps(pinned pluginruntime.PinnedEndpoint, task *model.Task, exists bool, err error) pluginProtocolBridgeDeps { |
| 1538 | deps := pluginProtocolTestDeps() |
| 1539 | deps.getByTaskId = func(userId int, taskId string) (*model.Task, bool, error) { |
| 1540 | if !exists { |
| 1541 | return nil, false, err |
| 1542 | } |
| 1543 | if task != nil && (userId != task.UserId || taskId != task.TaskID) { |
| 1544 | return nil, false, err |
| 1545 | } |
| 1546 | return task, task != nil, err |
| 1547 | } |
| 1548 | deps.resolvePlugin = func(constant.TaskPlatform) (*pluginruntime.LoadedPlugin, *pluginruntime.RoutingGeneration, bool) { |
| 1549 | if pinned.Plugin == nil { |
| 1550 | return nil, nil, false |
| 1551 | } |
| 1552 | return pinned.Plugin, pinned.Generation, true |
| 1553 | } |
| 1554 | return deps |
| 1555 | } |
no test coverage detected