(dbApps []database.WorkspaceApp, agent database.WorkspaceAgent, ownerName string, workspace database.Workspace, appHostname string)
| 207 | } |
| 208 | |
| 209 | func dbAppsToProto(dbApps []database.WorkspaceApp, agent database.WorkspaceAgent, ownerName string, workspace database.Workspace, appHostname string) ([]*agentproto.WorkspaceApp, error) { |
| 210 | ret := make([]*agentproto.WorkspaceApp, len(dbApps)) |
| 211 | for i, dbApp := range dbApps { |
| 212 | var err error |
| 213 | ret[i], err = dbAppToProto(dbApp, agent, ownerName, workspace, appHostname) |
| 214 | if err != nil { |
| 215 | return nil, xerrors.Errorf("parse app %v (%q): %w", i, dbApp.Slug, err) |
| 216 | } |
| 217 | } |
| 218 | return ret, nil |
| 219 | } |
| 220 | |
| 221 | func dbAppToProto(dbApp database.WorkspaceApp, agent database.WorkspaceAgent, ownerName string, workspace database.Workspace, appHostname string) (*agentproto.WorkspaceApp, error) { |
| 222 | sharingLevelRaw, ok := agentproto.WorkspaceApp_SharingLevel_value[strings.ToUpper(string(dbApp.SharingLevel))] |
no test coverage detected