()
| 2132 | } |
| 2133 | |
| 2134 | func (h *HostAPIHandler) automationManager() (HostAPIAutomationManager, error) { |
| 2135 | if h == nil { |
| 2136 | return nil, errors.New("extension: host api handler is required") |
| 2137 | } |
| 2138 | if h.automation != nil { |
| 2139 | return h.automation, nil |
| 2140 | } |
| 2141 | if h.automationGetter != nil { |
| 2142 | if automation := h.automationGetter(); automation != nil { |
| 2143 | return automation, nil |
| 2144 | } |
| 2145 | } |
| 2146 | return nil, errors.New("extension: automation manager is not configured") |
| 2147 | } |
| 2148 | |
| 2149 | func (h *HostAPIHandler) resolveAutomationWorkspaceID(ctx context.Context, rawWorkspace string) (string, error) { |
| 2150 | trimmed := strings.TrimSpace(rawWorkspace) |
no outgoing calls
no test coverage detected