An open API service indexing awesome lists of open source software.

https://github.com/danny-yamamoto/go-sandbox-clean

These are samples of clean architecture.
https://github.com/danny-yamamoto/go-sandbox-clean

clean-architecture go

Last synced: about 2 months ago
JSON representation

These are samples of clean architecture.

Awesome Lists containing this project

README

        

# go-sandbox-clean

```mermaid
---
title: Payment Class Diagram
---
classDiagram
class Payment {
+PaymentID : int
}

class PaymentRepository {
+GetPaymentID(limit int) (*[]Payment, error)
}

class paymentRepository {
-db : *sql.DB
}

class PaymentControllerInterface {
+GetPaymentID(limit int) (*[]Payment, error)
}

class PaymentController {
-paymentRepository : PaymentRepository
}

class Main {
-db : *sql.DB
-router : *mux.Router
-paymentController : PaymentControllerInterface
}

class Router {
-paymentController : PaymentControllerInterface
}

Payment -- PaymentRepository : uses
PaymentRepository <|.. paymentRepository : implements
paymentRepository --> PaymentRepository : depends
PaymentController --> PaymentRepository : depends
PaymentController <|.. PaymentControllerInterface : implements
PaymentControllerInterface -- PaymentRepository : uses
Main --> PaymentControllerInterface : depends
Router --> PaymentControllerInterface : depends
```