Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Moving toward 1.0.0 #58

Open
vetcher opened this issue May 11, 2018 · 0 comments
Open

Moving toward 1.0.0 #58

vetcher opened this issue May 11, 2018 · 0 comments
Assignees

Comments

@vetcher
Copy link
Contributor

vetcher commented May 11, 2018

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 _mcg or _microgen to every file name, so files will be exchanges_mcg.go instead of exchanges.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

@vetcher vetcher self-assigned this May 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant