mirror of
https://github.com/cubixle/tuugen.git
synced 2026-04-24 23:04:45 +01:00
wip
This commit is contained in:
46
README.md
Normal file
46
README.md
Normal file
@@ -0,0 +1,46 @@
|
||||
# Tuugen
|
||||
|
||||
Tuugen takes a tuugen.yml and a grpc proto definition to generate common boiler plate logic. Some of the common boiler plate it generates is http routes, grpc service, data model structs and a main file with some default plumbing.
|
||||
|
||||
Tuugen adds an interactor package which the http and grpc transport layers use for business logic.
|
||||
|
||||
Feel free to pull the repo and play around with the example_project.
|
||||
|
||||
## Using Tuugen.
|
||||
|
||||
```
|
||||
go install github.com/cubixle/tuugen
|
||||
```
|
||||
|
||||
And the run `tuugen` in the root dir of your project or wherever you have your tuugen and proto file.
|
||||
|
||||
## Example tuugen file
|
||||
```yaml
|
||||
project: tuugen_test_project
|
||||
import_path: github.com/cubixle/tuugen/example_project
|
||||
proto_file: service.proto
|
||||
grpc_file: internal/pb/service/service_grpc.pb.go
|
||||
service_name: Service
|
||||
data_models:
|
||||
- name: User
|
||||
properties:
|
||||
- name: id
|
||||
type: varchar
|
||||
autoinc: true
|
||||
- name: team_id
|
||||
type: varchar
|
||||
- name: name
|
||||
type: varchar
|
||||
- name: email
|
||||
type: varchar
|
||||
- name: created_at
|
||||
type: timestamp
|
||||
- name: updated_at
|
||||
type: timestamp
|
||||
- name: Team
|
||||
properties:
|
||||
- name: id
|
||||
type: varchar
|
||||
- name: name
|
||||
type: varchar
|
||||
```
|
||||
Reference in New Issue
Block a user