Skip to content

Moving toward 1.0.0 #58

Description

@vetcher

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions