Review Request #6825 — Created Jan. 23, 2015 and discarded
This is the beginnings of the rb-gateway project. It is meant to extend existing ReviewBoard functionalities to provide better support for repositories.
Currently, this is a wireframe set up using Google Go (no additional frameworks).
Structure is as followed:
- repository.go : Base repository structure and interface
- git_repository.go : The Git implementation of repository.go
- web_service.go : Handles all web services and routing
- util.go : Handles configuration loading and repository lookup
- config.json : Sample configuration file using .json format
- main.go : main() lives here
Currently as a test, the web server runs on port 8888. A sample works as follows:
1. Specify repo_name = path in config.json (see file attachment)
2. After the server is started, go to ./localhost:8888?repo=repo_name&id=sha
3. A file should download, however my shell exec command isn't currently working in Go - need to fix.
It might be worthwhile to just set the Dir directly and then run git, instead of cd'ing. cmd := exec.Command("git", ...
Might want to return a 404 if it's not there.
You don't really wan't to be executing shell scripts ever, just in case something is misconfigured.