Repo module
Layer 5. Objects. Objects
Source: modules/repo/.
At a glance
Section titled “At a glance”| CLI | shc repo |
| Subcommands | 5 |
| HTTP endpoints | see the route reference |
| Events emitted | see the event reference |
| Error codes | see the error code reference |
| Service classes | RepoService |
| Cross-module deps | app, doctor, health |
Source layout
Section titled “Source layout”modules/repo/├── doctor.go├── errors.go├── events.go├── models.go├── router.go├── service.go├── types.go└── commands/CLI entry points
Section titled “CLI entry points”shc repo: manage app repositories
HTTP API
Section titled “HTTP API”Routes are listed in the generated route reference; request/response notes live in the API reference.
Events emitted
Section titled “Events emitted”Event codes, durability class, and payload shapes are listed in the generated event reference.
Errors
Section titled “Errors”Typed errors are catalogued in the error code reference with HTTP statuses and message templates.
Responsibilities
Section titled “Responsibilities”The repo module fetches a repository and registers the apps in it
so shc search and shc install <name> can find them. Source:
modules/repo/service.go.
Service.SyncRepo and SyncAll dispatch by URL: syncGit, syncHTTP,
syncRegistry, or syncShipped. repo add refuses a file:// URL
(X400927REPFIL). runCrawler asks the app module to crawl the fetched
tree. An unknown repo is X404901REPNOF. A sync failure is X500903REPSYN.
What the repo module does not own: running the apps it discovers
(that is app / stack), or the schedule
that fires a sync (that is schedule).