katzien / go-structure-examples

Examples for my talk on structuring go apps
MIT License
2.35k stars 287 forks source link

Clean Architecture - Is not correct or i'm missing something #27

Open gravataLonga opened 4 years ago

gravataLonga commented 4 years ago

It's me or this is bussiness logic and cannot be here. https://github.com/katzien/go-structure-examples/blob/master/domain-hex-actor/pkg/storage/json/repository.go#L53-L59

To my own understand bussiness logic must be inside of "Domain" layer. This a mess or a missing something?

profiralex commented 3 years ago

@gravataLonga I assume you can treat it like an implementation of a database "unique" constraint. Although this logic can be represented in the "Domain" layer too to make it obvious from the beginning.