| 44 | } |
| 45 | |
| 46 | func updateWorkspaceLockEntry(ctx context.Context, query *Query, entry workspace.LookupEntry) (workspace.LookupResult, error) { |
| 47 | switch { |
| 48 | case entry.Namespace == lockCoreNamespace && entry.Operation == lockContainerFromOperation: |
| 49 | return updateContainerFromLockEntry(ctx, query, entry) |
| 50 | case entry.Namespace == lockCoreNamespace && entry.Operation == lockModulesResolveOperation: |
| 51 | return updateModuleResolveLockEntry(ctx, query, entry) |
| 52 | case entry.Namespace == lockCoreNamespace && entry.Operation == lockGitHeadOperation: |
| 53 | return updateGitHeadLockEntry(ctx, entry) |
| 54 | case entry.Namespace == lockCoreNamespace && entry.Operation == lockGitRefOperation: |
| 55 | return updateGitRefLockEntry(ctx, entry) |
| 56 | case entry.Namespace == lockCoreNamespace && entry.Operation == lockGitBranchOperation: |
| 57 | return updateGitBranchLockEntry(ctx, entry) |
| 58 | case entry.Namespace == lockCoreNamespace && entry.Operation == lockGitTagOperation: |
| 59 | return updateGitTagLockEntry(ctx, entry) |
| 60 | default: |
| 61 | return workspace.LookupResult{}, fmt.Errorf("unsupported lock entry %q %q", entry.Namespace, entry.Operation) |
| 62 | } |
| 63 | } |
| 64 | |
| 65 | func updateContainerFromLockEntry(ctx context.Context, query *Query, entry workspace.LookupEntry) (workspace.LookupResult, error) { |
| 66 | if len(entry.Inputs) != 2 { |