(r *http.Request)
| 19 | type workspaceAgentContextKey struct{} |
| 20 | |
| 21 | func WorkspaceAgentOptional(r *http.Request) (database.WorkspaceAgent, bool) { |
| 22 | user, ok := r.Context().Value(workspaceAgentContextKey{}).(database.WorkspaceAgent) |
| 23 | return user, ok |
| 24 | } |
| 25 | |
| 26 | // WorkspaceAgent returns the workspace agent from the ExtractAgent handler. |
| 27 | func WorkspaceAgent(r *http.Request) database.WorkspaceAgent { |
no test coverage detected