Categorygithub.com/sundaytycoon/buttons-api
repositorypackage
0.0.0-20220403165414-79ce300d6602
Repository: https://github.com/sundaytycoon/buttons-api.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
No description provided by the author
No description provided by the author

# README

buttons-api

섀계 UMLs

UMLs.md

gettings started

go run cmd/main.go server start # 5001 grpc - 5002 http

package structue?

  πŸ“‚ git@sundaytycoon/buttons-api
   β”£πŸ“‚ cmd
   ┃ β”— πŸ“œ main.go # [server, entd]κ°€ 있음
   β”£πŸ“‚ doc
   ┃ β”— πŸ“‚ OpenAPI # swagger.jsonλ“€μ–΄μ˜€λŠ”κ³³/ swagger-ui λ‹€μš΄λ°›λŠ” κ³³
   β”£πŸ“‚ edge # λΉ„μ§€λ‹ˆμŠ€λ‘œμ§ μƒμ„Έν•˜κ²Œ 타지 μ•ŠμœΌλ©΄μ„œ, μ™ΈλΆ€ μ„œλ²„λž‘ μ΅œμ’…μ μœΌλ‘œ ν†΅μ‹ ν•˜λŠ” μ½”λ“œλ“€
   β”£πŸ“‚ ent # entd.go 의 generated된 νŒŒμΌλ“€ ν•œ 뭉텅이
   β”£πŸ“‚ gen/go/buttons/api/v1 # protobuf둜 generated된 golang파일
   β”£πŸ“‚ internal # λ‚΄λΆ€ λΉ„μ§€λ‹ˆμŠ€λ‘œμ§ λ‹΄λŠ”κ³³ # λ˜₯같은 μ½”λ“œλ“€ λ‘λŠ” κ³³
   β”£πŸ“‚ pkg
   β”£πŸ“‚ proto # protobuf νŒŒμΌλ“€μ΄ 있음.
make generate-docs # μš”κ±°ν•˜λ©΄ μ½”λ“œ dependency graphκ°€ λ°”λ€Œμ–΄μš”

code dependency graph

wiki

ent.go μœ μš©ν•œ 슀크립트 λͺ¨μŒ

# add model
go run entgo.io/ent/cmd/ent init User

# sync schema
### First, should to modify ent/schema/*.go before synchronizing schema
vi ./ent/schema/*.go # step 1
go generate ./ent # step 2
go run cmd/main.go ent migration # step 3


개발 μ…‹νŒ… κ΄€λ ¨ λ¬Έμ„œ

scripts

protobuf generating

make protosetup # For set up protobuf using `buf`

make protogen # For generating protobuf

References