-
compose.yml
νμΌμ΄ μ‘΄μ¬νλ κ²½λ‘λ‘ μ΄λν©λλ€. -
docker-compose up --build -d
λͺ λ Ήμ΄λ₯Ό μ€νν©λλ€. -
Docker Desktop
μμ μλ μ΄λ―Έμ§μ κ°μ΄ 컨ν μ΄λκ° μ μ€ν μ€μΈμ§ νμΈν©λλ€.
π λͺ¨λ ν μ€νΈ μ½λ νμΈ λͺ λ Ήμ΄
go test ./internal/...
π μ±κ³΅ν ν μ€νΈ μ½λ νμΈ λͺ λ Ήμ΄
go test ./internal/... -json | Select-String -Pattern '"Action":"pass"' | Measure-Object
π μ€ν¨ν ν μ€νΈ μ½λ νμΈ λͺ λ Ήμ΄
go test ./internal/... -json | Select-String -Pattern '"Action":"fail"' | Measure-Object
HTTP Method | URI | Description | Authentication | Authorization | ETC |
---|---|---|---|---|---|
GET | /api/health |
μλΉμ€ μν νμΈ | β (No) | β (No) | |
POST | /api/login |
μ¬μ©μ λ‘κ·ΈμΈ | β (No) | β (No) | |
POST | /api/members |
νμ κ°μ | β (No) | β (No) | |
GET | /api/members/me |
λ΄ μ 보 μ‘°ν | β (Yes) | β (No) | |
PUT | /api/members/me |
λ΄ μ 보 μμ | β (Yes) | β (No) | |
DELETE | /api/members/me |
νμ νν΄ | β (Yes) | β (No) | |
GET | /api/members |
νμ λͺ©λ‘ μ‘°ν | β (Yes) | β (Yes) | κΆν λ³κ²½ ν, μ¬ λ‘κ·ΈμΈ νμ |
GET | /api/members/stats |
νμ ν΅κ³ μ‘°ν | β (Yes) | β (Yes) | κΆν λ³κ²½ ν, μ¬ λ‘κ·ΈμΈ νμ |
GET | /api/products |
μν λͺ©λ‘ μ‘°ν | β (Yes) | β (No) | |
POST | /api/products |
μν μμ± | β (Yes) | β (Yes) | κΆν λ³κ²½ ν, μ¬ λ‘κ·ΈμΈ νμ |
PUT | /api/products/:product_number/stock |
μν μ¬κ³ μμ | β (Yes) | β (Yes) | κΆν λ³κ²½ ν, μ¬ λ‘κ·ΈμΈ νμ |
DELETE | /api/products/:product_number |
μν μμ | β (Yes) | β (Yes) | κΆν λ³κ²½ ν, μ¬ λ‘κ·ΈμΈ νμ |
POST | /api/orders |
μ£Όλ¬Έ μμ± | β (Yes) | β (No) | |
GET | /api/orders/me |
λ΄ μ£Όλ¬Έ μ‘°ν | β (Yes) | β (No) | |
PUT | /api/orders/:order_number/cancel |
μ£Όλ¬Έ μ·¨μ | β (Yes) | β (No) | |
GET | /api/orders/stats |
μ£Όλ¬Έ ν΅κ³ μ‘°ν | β (Yes) | β (Yes) | κΆν λ³κ²½ ν, μ¬ λ‘κ·ΈμΈ νμ |
swag init
go-server 컨ν
μ΄λ μ€ν νμΈ ν, `http://localhost:3031/docs/index.html` μ κ·Ό
μΈμ¦μ΄ νμν κΈ°λ₯μ ν
μ€νΈνκΈ° μν΄ Swagger μ°μΈ‘ μλ¨ Authorize λ²νΌ
μ ν΄λ¦ν΄ λ‘κ·ΈμΈ ν, λ°κΈλ°μ ν κ·Όμ Bearer Token
νμμΌλ‘ μ
λ ₯ν©λλ€.
π μ°Έκ³ Link
4κ°μ ν΅μ¬ λλ©μΈ κ³μΈ΅μ΄ μμ΅λλ€.
Models Layer
Infrastructure Layer
Usecase Layer
Controller Layer
βββ database
βββ deploy
βββ docs
β βββ docs.go
β βββ swagger.json
β βββ swagger.yaml
β
βββ internal
β βββ domain
β β βββ repository (interface)
β β β βββ member_repository.go
β β β
β β βββ member.go
β β βββ member_test.go
β β βββ ...
β β
β βββ infrastructure
β β βββ configs
β β βββ repository (impl)
β β β βββ member_repository_impl.go
β β β
β β βββ router
β β
β βββ interfaces
β β βββ controller
β β βββ dto
β β βββ middleware
β β
β βββ usecases
β
βββ test
β βββ fixtures
β
βββ compose.yml
βββ Dockerfile
βββ go.mod
Tag | Description |
---|---|
feat |
μλ‘μ΄ κΈ°λ₯μ μΆκ°ν κ²½μ° μ¬μ©ν©λλ€. |
fix |
λ²κ·Έλ₯Ό μμ ν κ²½μ° μ¬μ©ν©λλ€. |
refactor |
μ½λ 리ν©ν λ§ν κ²½μ° μ¬μ©ν©λλ€. |
style |
μ½λ νμ, μ λ ¬, μ£Όμ λ±μ λ³κ²½(λμμ μν₯μ μ£Όλ μ½λ λ³κ²½ μμ)ν κ²½μ° μ¬μ©ν©λλ€. |
test |
ν μ€νΈ μΆκ°, ν μ€νΈ 리ν©ν λ§(μ ν μ½λ μμ μμ, ν μ€νΈ μ½λμ κ΄λ ¨λ λͺ¨λ λ³κ²½μ ν΄λΉ)ν κ²½μ° μ¬μ©ν©λλ€. |
docs |
λ¬Έμλ₯Ό μμ (μ ν μ½λ μμ μμ)ν κ²½μ° μ¬μ©ν©λλ€. |
chore |
λΉλ μ 무 μμ , ν¨ν€μ§ 맀λμ μ€μ λ± μμ ν΄λΉλμ§ μλ λͺ¨λ λ³κ²½(μ ν μ½λ μμ μμ)μΌ κ²½μ° μ¬μ©ν©λλ€. |