The versions of any generated file should be up to date in master,
running go generate on a freshly cloned version of truss should be a
noop. This allows for people to go get truss without running go generate
Improve cohesion and removing coupling. Use the io.Reader interface for
inputs and returns to improve composiblity which helps with testing.
Simpler functions for simpler tests.
Also combed the comments to help keep them fresh.
grpc golang structures were being dereferenced in endpoints.go then
passed to the server handlers, then the return value was being
referenced in endpoints.go and returned up the stack. Now the pointer
is directly passed to the server handler and the server handler returns
a pointer to the response type.
Also added listing the response type message fields as comments to the server
handler template. This allows for quickly creating a response struct by
uncommenting the fields you want to populate
A bug introduced when truss's output was restructured was that the
server and client handlers were not being parsed. This was a
combination of truss not reading in files properly and gengokit not
searching the read in files properly. These both have been fixed.
Also added parsing of comments of server and client handler which was
an early oversight
truss's output structure now looks like the following where NAME is the
package name of the definition file
.
├── NAME-service
│ ├── docs
│ │ └── docs.md
│ ├── generated
│ │ └── ...
│ ├── handlers
│ │ ├── client
│ │ │ └── client_handler.go
│ │ └── server
│ │ └── server_handler.go
│ ├── NAME-client
│ │ └── client_main.go
│ ├── NAME-server
│ │ └── server_main.go
│ └── svc.pb.go
├── svc.proto
└── third_party
└── ...
Now go build ./... is possible from the root directory.
truss no longer builds the server or client.
These changes have been reflected in the integration_tests where the
integration runner now builds the services. See
./truss/integration_tests/README.md for more details
Add USAGE.md to root to describe the file modification agreement
http_transport decode now properly converts 32bit floats and int from
64bit types return from strconv. Fixes issue #39
This PR also handles uint32 and uint64 for http_transport decode and
client argument generation
Also updating .travis.yml to run tests ./deftree directory
Consolidate makedt and httpopts into doctree
Move `doctree` from `gendoc/doctree` into a separate top level package
called `deftree`. Then, move generation of markdown documentation from
within `deftree` into `gendoc`.
Remove unused describeMarkdown methods in deftree
Remove unused scanner test
Vetted that this still works as expected, and it does. Docker approach will change shortly, but this is definitely an improvement to reduce UFS layers. Next change will pull protobuf prebuilt binary as well, to avoid the lengthy and filesystem-pollutey build process.