René's URL Explorer Experiment


Title: feat: Prototype - Stub APIs for /projects and /workspaces endpoints by bryphe-coder · Pull Request #30 · coder/coder · GitHub

Open Graph Title: feat: Prototype - Stub APIs for /projects and /workspaces endpoints by bryphe-coder · Pull Request #30 · coder/coder

X Title: feat: Prototype - Stub APIs for /projects and /workspaces endpoints by bryphe-coder · Pull Request #30 · coder/coder

Description: This adds some very simple, hardcoded endpoints for the /projects and /workspaces - just enough test data to exercise the flow in the UI: // Projects endpoint r.Route("/projects", func(r chi.Router) { r.Route("/{organization}", func(r chi.Router) { // TODO: Authentication // TODO: User extraction // TODO: Extract organization and add to context r.Get("/", api.projectService.getProjects) r.Post("/", api.projectService.createProject) r.Get("/{projectId}", api.projectService.getProjectById) // TODO: Get project by id }) }) // Workspaces endpoint r.Route("/workspaces", func(r chi.Router) { r.Route("/{organization}", func(r chi.Router) { r.Get("/", api.workspaceService.getWorkspaces) r.Get("/{workspaceId}", api.workspaceService.getWorkspaceById) }) }) With this, I can use the develop.sh script and get a server that sends data back for those APIs: In order to facilitate this, I brought in the xjson library... which then required several other additional libraries: srverr validate longid buildmode ...and some external libraries: github.com/asaskevich/govalidator github.com/go-playground/validator/v10 k8s.io/utils There's a couple possible next steps: This might be completely superceded by work @kylecarbs is doing - so it's fine if this goes away and replaced by a more robust set of APIs! We can still discuss the types and make sure we have parity on the API surface. We could merge this as scaffolding to build out the API routes - there's a lot left to be plumbed and connected to the actual provisioners. Related to #23

Open Graph Description: This adds some very simple, hardcoded endpoints for the /projects and /workspaces - just enough test data to exercise the flow in the UI: // Projects endpoint r.Route("/projects", fun...

X Description: This adds some very simple, hardcoded endpoints for the /projects and /workspaces - just enough test data to exercise the flow in the UI: // Projects endpoint r.Route("/projects&qu...

Opengraph URL: https://github.com/coder/coder/pull/30

X: @github

direct link

Domain: github.com

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:625ebe8f-0d28-6108-ad69-9c2b2e542591
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idDC7A:28A483:14FDF:1AEEC:6B017E1B
html-safe-nonce8795f3f4fcf2b44db90725b5b5d66997cacd9e35d9023c95d451a794e370f9f2
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEQzdBOjI4QTQ4MzoxNEZERjoxQUVFQzo2QjAxN0UxQiIsInZpc2l0b3JfaWQiOiIyODI5NjEzMTQzMTc5NzU1MDM1IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmacaf46f7aced0bb4219fe41038198a4f83b2836446e0a83b7dea66f1090639e7bd
hovercard-subject-tagpull_request:826118087
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/coder/coder/pull/30/files
twitter:imagehttps://avatars.githubusercontent.com/u/88213859?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/88213859?s=400&v=4
og:image:altThis adds some very simple, hardcoded endpoints for the /projects and /workspaces - just enough test data to exercise the flow in the UI: // Projects endpoint r.Route("/projects", fun...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Nonecc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/coder/coder git https://github.com/coder/coder.git
octolytics-dimension-user_id95932066
octolytics-dimension-user_logincoder
octolytics-dimension-repository_id440752086
octolytics-dimension-repository_nwocoder/coder
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id440752086
octolytics-dimension-repository_network_root_nwocoder/coder
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release8c77c9e8439031ad54c75a250694842892f693e1
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/coder/coder/pull/30/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fcoder%2Fcoder%2Fpull%2F30%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fcoder%2Fcoder%2Fpull%2F30%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=coder%2Fcoder
Reloadhttps://github.com/coder/coder/pull/30/files
Reloadhttps://github.com/coder/coder/pull/30/files
Reloadhttps://github.com/coder/coder/pull/30/files
coderhttps://github.com/coder
coderhttps://github.com/coder/coder
Codehttps://github.com/coder/coder
Issues320 (320)https://github.com/coder/coder/issues
Pull requests470 (470)https://github.com/coder/coder/pulls
Discussionshttps://github.com/coder/coder/discussions
Actionshttps://github.com/coder/coder/actions
Projectshttps://github.com/coder/coder/projects
Security and quality49 (49)https://github.com/coder/coder/security
Insightshttps://github.com/coder/coder/insights
Sign up for GitHub https://github.com/signup?return_to=%2Fcoder%2Fcoder%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fcoder%2Fcoder%2Fissues%2Fnew%2Fchoose
bryphe-coderhttps://github.com/bryphe-coder
mainhttps://github.com/coder/coder/tree/main
bryphe/prototype/initial-apishttps://github.com/coder/coder/tree/bryphe/prototype/initial-apis
Conversation 3 https://github.com/coder/coder/pull/30
Commits 3 https://github.com/coder/coder/pull/30/commits
Checks 0 https://github.com/coder/coder/pull/30/checks
Files changed https://github.com/coder/coder/pull/30/files
Please reload this pagehttps://github.com/coder/coder/pull/30/files
feat: Prototype - Stub APIs for /projects and /workspaces endpoints https://github.com/coder/coder/pull/30/files#top
Show all changes 3 commits https://github.com/coder/coder/pull/30/files
18dd18f Add several dependencies needed for API routes bryphe-coder Jan 19, 2022 https://github.com/coder/coder/pull/30/commits/18dd18f32362b23674520425f691512eaadb7556
7329cca Add placeholder API and projectService bryphe-coder Jan 19, 2022 https://github.com/coder/coder/pull/30/commits/7329cca18e53062024bceaf95aa0649839deb274
6726f40 Create initial workspaces API bryphe-coder Jan 19, 2022 https://github.com/coder/coder/pull/30/commits/6726f40cf0ddfa7e4ec6bcf876a95d5768343d9c
Clear filters https://github.com/coder/coder/pull/30/files
Please reload this pagehttps://github.com/coder/coder/pull/30/files
Please reload this pagehttps://github.com/coder/coder/pull/30/files
buildmode.go https://github.com/coder/coder/pull/30/files#diff-e6e674254536bf57c98eb065bad2076032400ce4959da48a3672b90dea37bbaf
api.go https://github.com/coder/coder/pull/30/files#diff-b23caaa4ca5d854610e30a2f54dcf7d770f76d09edd09a72b749430a4fcf673d
coderd.go https://github.com/coder/coder/pull/30/files#diff-cae99a4758751d753f0ebcc421c2e10c55cbdc9cc6a08bfd89a7eb970db55f36
projects.go https://github.com/coder/coder/pull/30/files#diff-cf2f422ff138004720d2804e036148a0359888b8903d0b4e312e650f5a892f78
workspaces.go https://github.com/coder/coder/pull/30/files#diff-46f90baab52ea3ad914acbde30d656dbc8e46f5918d19bc056c445a1dc502482
go.mod https://github.com/coder/coder/pull/30/files#diff-33ef32bf6c23acb95f5902d7097b7a1d5128ca061167ec0716715b0b9eeaa5f6
go.sum https://github.com/coder/coder/pull/30/files#diff-3295df7234525439d778f1b282d146a4f1ff6b415248aaac074e8042d9f42d63
id.go https://github.com/coder/coder/pull/30/files#diff-dfaf613c0754d0be7e4f68ee67627872dded7eaf04e2cd700c575e1df0b6bb55
id_test.go https://github.com/coder/coder/pull/30/files#diff-6ccc97353cd778796d71d64e9f6b9a88f72cc26c68d8f6b49747f06ab0db7d40
error.go https://github.com/coder/coder/pull/30/files#diff-641ccbd8a24aac13f94a824764f39f0dee68c33d4b5c6375c69ce3e61c94c103
error_test.go https://github.com/coder/coder/pull/30/files#diff-46b347c7cdbafff2ebb882cd4f34b5b1514c73f2c200a55d86af092a8e7a0739
errors.go https://github.com/coder/coder/pull/30/files#diff-4767c7e9984e8229fba6cdd45f32c2d1ed4b2ea2604451cd57c752874aa99822
wrap.go https://github.com/coder/coder/pull/30/files#diff-46c623d4849eea400098ff6d4809348a08017afc86240a214c2153bf190af589
devurl.go https://github.com/coder/coder/pull/30/files#diff-807015ffb7464eff718e864bd464a783f4e41c86edbb6dfb6f998b7c1fec75ae
devurl_test.go https://github.com/coder/coder/pull/30/files#diff-797515432bfdb10279d74afaaab9dadbcf6d521be1311ccc5af65ccac92d05fa
numeric.go https://github.com/coder/coder/pull/30/files#diff-000582d56c70e1a7cb8d8aabbc0829c0c71ba3e74dd771b3c2be7b1647efa837
numeric_test.go https://github.com/coder/coder/pull/30/files#diff-740129077e9c2b3257ab065b58e2d0dd31583c21fb658c7e0666c5b7841456e9
struct.go https://github.com/coder/coder/pull/30/files#diff-57f4dc6ef446f180b93e60a2dfe2e5d046b14892f4d5773b37513ebe7a43ba7a
struct_test.go https://github.com/coder/coder/pull/30/files#diff-7af807476c255b380ba92d6556e312256f21e5a49ae27e7e8cd4d9b4fe55fd27
user.go https://github.com/coder/coder/pull/30/files#diff-a9721a512169d0a7b6c798807f2249be04622bf6e045114646bfa97e055fd5ad
user_test.go https://github.com/coder/coder/pull/30/files#diff-dc211e2bfae1e3a7789a80630c7ae6da9d5772f47e33893dc27aec7e4ec27958
validator.go https://github.com/coder/coder/pull/30/files#diff-39471d726f56d35448422ca6d05c4c211590096b1d61125228d91d58f38d26b0
validator_test.go https://github.com/coder/coder/pull/30/files#diff-a6644366d7819bd000625c34022fcd40a9353c4085bf6353c72401e010e7ea66
assert.go https://github.com/coder/coder/pull/30/files#diff-0976777e6390cba77c72c62e745f07aede6de6de5bf235902fd14b0cc2570f15
doc.go https://github.com/coder/coder/pull/30/files#diff-949d553d23e1841c9abb36dcfccb7024bccef31ad0b82e8192fc2ecb88c7b62e
duration.go https://github.com/coder/coder/pull/30/files#diff-c0cf887bc53dfcf386a69aea9d462f95953f6c3e2fe723652426f28c0cac13d8
duration_test.go https://github.com/coder/coder/pull/30/files#diff-0ac7e76ee9d69a14c8697d1235fcb9b3d448eb87b05e806b84529b1749a57d8e
error.go https://github.com/coder/coder/pull/30/files#diff-3f84fd8debf6784e26cbf00df7dc71d224c5d35fc99c6eb9a035df94aa76b0b2
error_page.html https://github.com/coder/coder/pull/30/files#diff-ec60b2f2c3558bb0e9d6d4fb07ee71f8feca0daa7162c5652c44a9e072101393
error_test.go https://github.com/coder/coder/pull/30/files#diff-d4d3c853b685d37b722cbecc8818f27e06d7baa37360f354fc9330a83ba7904b
json.go https://github.com/coder/coder/pull/30/files#diff-836b99fbcfc72b06286144b7ff3609d7bc8946b1a47ea0ffe59855ef7f0886ed
json_test.go https://github.com/coder/coder/pull/30/files#diff-f135edcf3ca422576f127fa6eeab02a3907e66d66fe41bdfe042797c28dc5303
buildmode/buildmode.gohttps://github.com/coder/coder/pull/30/files#diff-e6e674254536bf57c98eb065bad2076032400ce4959da48a3672b90dea37bbaf
View file https://github.com/coder/coder/blob/6726f40cf0ddfa7e4ec6bcf876a95d5768343d9c/buildmode/buildmode.go
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/coder/coder/pull/30/{{ revealButtonHref }}
coderd/api.gohttps://github.com/coder/coder/pull/30/files#diff-b23caaa4ca5d854610e30a2f54dcf7d770f76d09edd09a72b749430a4fcf673d
View file https://github.com/coder/coder/blob/6726f40cf0ddfa7e4ec6bcf876a95d5768343d9c/coderd/api.go
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/coder/coder/pull/30/{{ revealButtonHref }}
coderd/coderd.gohttps://github.com/coder/coder/pull/30/files#diff-cae99a4758751d753f0ebcc421c2e10c55cbdc9cc6a08bfd89a7eb970db55f36
View file https://github.com/coder/coder/blob/6726f40cf0ddfa7e4ec6bcf876a95d5768343d9c/coderd/coderd.go
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/coder/coder/pull/30/{{ revealButtonHref }}
https://github.com/coder/coder/pull/30/files#diff-cae99a4758751d753f0ebcc421c2e10c55cbdc9cc6a08bfd89a7eb970db55f36
https://github.com/coder/coder/pull/30/files#diff-cae99a4758751d753f0ebcc421c2e10c55cbdc9cc6a08bfd89a7eb970db55f36
https://github.com/coder/coder/pull/30/files#diff-cae99a4758751d753f0ebcc421c2e10c55cbdc9cc6a08bfd89a7eb970db55f36
coderd/projects.gohttps://github.com/coder/coder/pull/30/files#diff-cf2f422ff138004720d2804e036148a0359888b8903d0b4e312e650f5a892f78
View file https://github.com/coder/coder/blob/6726f40cf0ddfa7e4ec6bcf876a95d5768343d9c/coderd/projects.go
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/coder/coder/pull/30/{{ revealButtonHref }}
coderd/workspaces.gohttps://github.com/coder/coder/pull/30/files#diff-46f90baab52ea3ad914acbde30d656dbc8e46f5918d19bc056c445a1dc502482
View file https://github.com/coder/coder/blob/6726f40cf0ddfa7e4ec6bcf876a95d5768343d9c/coderd/workspaces.go
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/coder/coder/pull/30/{{ revealButtonHref }}
go.modhttps://github.com/coder/coder/pull/30/files#diff-33ef32bf6c23acb95f5902d7097b7a1d5128ca061167ec0716715b0b9eeaa5f6
View file https://github.com/coder/coder/blob/6726f40cf0ddfa7e4ec6bcf876a95d5768343d9c/go.mod
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/coder/coder/pull/30/{{ revealButtonHref }}
https://github.com/coder/coder/pull/30/files#diff-33ef32bf6c23acb95f5902d7097b7a1d5128ca061167ec0716715b0b9eeaa5f6
https://github.com/coder/coder/pull/30/files#diff-33ef32bf6c23acb95f5902d7097b7a1d5128ca061167ec0716715b0b9eeaa5f6
https://github.com/coder/coder/pull/30/files#diff-33ef32bf6c23acb95f5902d7097b7a1d5128ca061167ec0716715b0b9eeaa5f6
https://github.com/coder/coder/pull/30/files#diff-33ef32bf6c23acb95f5902d7097b7a1d5128ca061167ec0716715b0b9eeaa5f6
https://github.com/coder/coder/pull/30/files#diff-33ef32bf6c23acb95f5902d7097b7a1d5128ca061167ec0716715b0b9eeaa5f6
go.sumhttps://github.com/coder/coder/pull/30/files#diff-3295df7234525439d778f1b282d146a4f1ff6b415248aaac074e8042d9f42d63
View file https://github.com/coder/coder/blob/6726f40cf0ddfa7e4ec6bcf876a95d5768343d9c/go.sum
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/coder/coder/pull/30/{{ revealButtonHref }}
https://github.com/coder/coder/pull/30/files#diff-3295df7234525439d778f1b282d146a4f1ff6b415248aaac074e8042d9f42d63
https://github.com/coder/coder/pull/30/files#diff-3295df7234525439d778f1b282d146a4f1ff6b415248aaac074e8042d9f42d63
https://github.com/coder/coder/pull/30/files#diff-3295df7234525439d778f1b282d146a4f1ff6b415248aaac074e8042d9f42d63
https://github.com/coder/coder/pull/30/files#diff-3295df7234525439d778f1b282d146a4f1ff6b415248aaac074e8042d9f42d63
https://github.com/coder/coder/pull/30/files#diff-3295df7234525439d778f1b282d146a4f1ff6b415248aaac074e8042d9f42d63
https://github.com/coder/coder/pull/30/files#diff-3295df7234525439d778f1b282d146a4f1ff6b415248aaac074e8042d9f42d63
https://github.com/coder/coder/pull/30/files#diff-3295df7234525439d778f1b282d146a4f1ff6b415248aaac074e8042d9f42d63
https://github.com/coder/coder/pull/30/files#diff-3295df7234525439d778f1b282d146a4f1ff6b415248aaac074e8042d9f42d63
https://github.com/coder/coder/pull/30/files#diff-3295df7234525439d778f1b282d146a4f1ff6b415248aaac074e8042d9f42d63
https://github.com/coder/coder/pull/30/files#diff-3295df7234525439d778f1b282d146a4f1ff6b415248aaac074e8042d9f42d63
https://github.com/coder/coder/pull/30/files#diff-3295df7234525439d778f1b282d146a4f1ff6b415248aaac074e8042d9f42d63
https://github.com/coder/coder/pull/30/files#diff-3295df7234525439d778f1b282d146a4f1ff6b415248aaac074e8042d9f42d63
https://github.com/coder/coder/pull/30/files#diff-3295df7234525439d778f1b282d146a4f1ff6b415248aaac074e8042d9f42d63
https://github.com/coder/coder/pull/30/files#diff-3295df7234525439d778f1b282d146a4f1ff6b415248aaac074e8042d9f42d63
https://github.com/coder/coder/pull/30/files#diff-3295df7234525439d778f1b282d146a4f1ff6b415248aaac074e8042d9f42d63
Please reload this pagehttps://github.com/coder/coder/pull/30/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.