-
Notifications
You must be signed in to change notification settings - Fork 23
Moving toward 1.0.0 #58
Copy link
Copy link
Open
Labels
Description
Stability
Microgen's workflow should be stable (every time generate same output). So, microgen command maybe included to any CI, like protoc does.
To achieve this:
- Add
_mcgor_microgento every file name, so files will beexchanges_mcg.goinstead ofexchanges.go. - Changes to some functions/structures/variables to be extendable for users.
- Understand, what to do with protobuf <--> golang converters.
Also, it should fix #57 and #13
Project structure
Second, microgen needs to improve project layout. After reading this article and looking at project layout standards repository, I propose to use this layout:
├── cmd
│ └── user_service
│ └── main.go
├── pb
│ └── api.proto
├── service // Middleware in past. Should contain service realisations and closures (middlewares)
│ ├── caching.go
│ ├── caching.microgen.go
│ ├── error_logging.microgen.go
│ ├── logging.microgen.go
│ ├── middleware.microgen.go
│ └── recovering.microgen.go
├── transport // And may be some others in future, NATS or AMQP for example
│ ├── grpc
│ │ ├── client.microgen.go
│ │ ├── protobuf_endpoint_converters.microgen.go
│ │ ├── protobuf_type_converters.microgen.go
│ │ └── server.microgen.go
│ ├── http
│ │ ├── client.microgen.go
│ │ ├── converters.microgen.go
│ │ └── server.microgen.go
│ ├── client.microgen.go
│ ├── endpoints.microgen.go
│ ├── exchanges.microgen.go
│ └── server.microgen.go
├── usersvc // Service domain types package and business logic
│ ├── api.go
│ └── user.go
├── vendor/
├── Dockerfile
├── Gopkg.lock
├── Gopkg.toml
├── Makefile
└── README.md
Tests
Need to add more tests for generator and generated code.
Also, we may generate some tests.
And add travis.ci.
Should fix #56
Reactions are currently unavailable