A Tutorial on writing Go REST servers using Swagger, including adding to the server CLI properly. #complete
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Elf M. Sternberg 65e2fb2ef8 Merge branch 'release/0.6.0' 6 years ago
cmd/timeofday-server Adding all features provided by swagger generate and dep init. 6 years ago
docs Documentation done, and Readme annotated with the appropriate links. 6 years ago
models The final swagger.yml and the built files that go with it. 6 years ago
restapi FINAL: CLI model. Also: changed 'clock' to 'time' or 'timeofday', depending. 6 years ago
timeofday Keeping track of the new shit. 6 years ago
.gitignore Updating License and gitignore. 6 years ago
DESCRIPION.md Keeping track of the new shit. 6 years ago
Gopkg.lock Adding all features provided by swagger generate and dep init. 6 years ago
Gopkg.toml Adding all features provided by swagger generate and dep init. 6 years ago
LICENSE Updating License and gitignore. 6 years ago
README.md Documentation done, and Readme annotated with the appropriate links. 6 years ago
swagger.yml Changing the swagger.yml file to be less verbose. 6 years ago

README.md

TIME-OF-DAY

TimeOfDay is a dead-simple microservice written in Go that, when pinged at the correct URL, returns the time of day. The server can take a single parameter either via GET or POST to specify the timezone from which the client wants the time.

This repository exists as a supplement to my tutorial, Adding Command Line Arguments to Go Swagger Microservices, in which I show how to do exactly that, by providing a dynamic way to configure the default timezone at server start-up, via the CLI or an environment variable.

Status

This project is complete. No future work will be done on it.

License

Apache 2.0. See the accompanying LICENSE file in this directory.

Warranty

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.