- Group: Go refresher (overview / pros / cons / setup)
- SimpleDev Work
- Group: Go dependencies (overview / pros / cons / setup)
- Individual / Pairs: Check your Go Environment, that this repository is within it, & add dependencies
- Group:
Go-Swagger
review (overview / usage) - Group:
Go-Swagger
generated server code review - Individual / Pairs: Install go-swagger, validate your Swagger spec, check out the generated docs, then generate your swagger code.
- Group: Review our stub handler.
- Group: Review how to run our code locally.
- Individual / Pairs: Test run your SimpleDev server and cURL against our stub Deposit route.
- TAQUITO Work
- Group: Review Localstack (how to run, why, interacting with DynamoDB there)
- Individual / Pairs: Run localstack and make your DynamoDB resources.
- Group: Review TAQUITO main.go / server.go
- Group: Review TAQUITO full Handlers.
- Group: Review TAQUITO internal services.
- Group: Review TAQUITO validators & dataUtils / hard data problems.
- Individual / Pairs: Spin up LocalStack with DynamoDB created
- Group: Some notes on TACO development parts missing in this session.
On a Mac / OSX, use homebrew:
$ brew install dep
$ brew upgrade dep
For other installs, follow the instructions here (cURL a shell script & run it, basically): https://github.com/golang/dep#installation
This presumes you already have go
installed on your machine and are running the commands in this repository within your Go working directory.
https://github.com/go-swagger/go-swagger/blob/master/docs/install.md <= has link to binary retrieval for installing swagger.
We want to validate and eventually generate some code based off of swagger.json
using the go-swagger
library. You'll need to install the go-swagger
library before running these commands (commands for those using Mac OSX):
$ brew tap go-swagger/go-swagger
$ brew install go-swagger
$ brew upgrade go-swagger
This should give you the swagger
binary command in your $GOPATH and allow you to manage versions better. The version of your go-swagger binary is 0.13.0 (run swagger version
to check this).
If instead of brew, you decide to install go-swagger from source (i.e. go get -u github.com/go-swagger/go-swagger/cmd/swagger
), you will be running the library at its Github dev
branch. You will need to change into that library (cd $GOPATH/src/github.com/go-swagger/go-swagger
) and checkout from Github the latest release (git checkout tags/0.13.0
). Then you will need to run go install github.com/go-swagger/go-swagger/cmd/swagger
to generate the go-swagger binary in your $GOPATH/bin
.
Once you are done with your TAQUITO swagger.json
specification, you can use go-swagger
to validate the file. Run:
$ swagger validate swagger.json
The swagger spec at "swagger.json" is valid against swagger specification 2.0
You can use the go-swagger
library to do a number of other things, like create a simple webpage & server for Swagger-based API documentation. Just run:
$ swagger serve swagger.json
2018/05/15 15:23:37 serving docs at http://localhost:50035/docs
Then go see your documentation at that URL. Once you're done, you can just hit cntl+c
to stop the web server. You can see the TACO API specification documentation here: https://sul-dlss-labs.github.io/taco/.