(ctx context.Context)
| 945 | } |
| 946 | |
| 947 | func (ws *WshServer) WorkspaceListCommand(ctx context.Context) ([]wshrpc.WorkspaceInfoData, error) { |
| 948 | workspaceList, err := wcore.ListWorkspaces(ctx) |
| 949 | if err != nil { |
| 950 | return nil, fmt.Errorf("error listing workspaces: %w", err) |
| 951 | } |
| 952 | var rtn []wshrpc.WorkspaceInfoData |
| 953 | for _, workspaceEntry := range workspaceList { |
| 954 | workspaceData, err := wcore.GetWorkspace(ctx, workspaceEntry.WorkspaceId) |
| 955 | if err != nil { |
| 956 | return nil, fmt.Errorf("error getting workspace: %w", err) |
| 957 | } |
| 958 | rtn = append(rtn, wshrpc.WorkspaceInfoData{ |
| 959 | WindowId: workspaceEntry.WindowId, |
| 960 | WorkspaceData: workspaceData, |
| 961 | }) |
| 962 | } |
| 963 | return rtn, nil |
| 964 | } |
| 965 | |
| 966 | func (ws *WshServer) ListAllAppsCommand(ctx context.Context) ([]wshrpc.AppInfo, error) { |
| 967 | return waveappstore.ListAllApps() |
nothing calls this directly
no test coverage detected