A Tutorial on writing Go REST servers using Swagger, including adding to the server CLI properly. #complete
Go to file
Elf M. Sternberg 65e2fb2ef8 Merge branch 'release/0.6.0'
* release/0.6.0:
  Documentation done, and Readme annotated with the appropriate links.
  Documentation done, and Readme annotated with the appropriate links.
  Finishing up the documentation.  Next step: Blogging.
2018-03-30 22:27:13 -07:00
cmd/timeofday-server Adding all features provided by swagger generate and dep init. 2018-03-28 12:23:24 -07:00
docs Documentation done, and Readme annotated with the appropriate links. 2018-03-30 22:26:12 -07:00
models The final swagger.yml and the built files that go with it. 2018-03-28 16:21:57 -07:00
restapi FINAL: CLI model. Also: changed 'clock' to 'time' or 'timeofday', depending. 2018-03-30 16:04:48 -07:00
timeofday Keeping track of the new shit. 2018-03-30 19:05:11 -07:00
.gitignore Updating License and gitignore. 2018-03-28 16:29:57 -07:00
DESCRIPION.md Keeping track of the new shit. 2018-03-30 19:05:11 -07:00
Gopkg.lock Adding all features provided by swagger generate and dep init. 2018-03-28 12:23:24 -07:00
Gopkg.toml Adding all features provided by swagger generate and dep init. 2018-03-28 12:23:24 -07:00
LICENSE Updating License and gitignore. 2018-03-28 16:29:57 -07:00
README.md Documentation done, and Readme annotated with the appropriate links. 2018-03-30 22:26:31 -07:00
swagger.yml Changing the swagger.yml file to be less verbose. 2018-03-29 07:28:01 -07:00

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.