diff options
| author | mo khan <mo@mokhan.ca> | 2025-05-07 10:47:31 -0700 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2025-05-07 10:47:31 -0700 |
| commit | c82468b1b32ad5bfb347fe65cd5dcfb6680795d1 (patch) | |
| tree | 679b4728fdae2ed296730a49f5100ddcf3c25f98 /app/domain | |
| parent | f0fbdab72254d68d0a3a4a49a4a1646f89f0f913 (diff) | |
refactor: provide context to repository to apply timeout
Diffstat (limited to 'app/domain')
| -rw-r--r-- | app/domain/repository.go | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/app/domain/repository.go b/app/domain/repository.go index fb7b6da..ae9da9e 100644 --- a/app/domain/repository.go +++ b/app/domain/repository.go @@ -1,7 +1,9 @@ package domain +import "context" + type Repository[T Entity] interface { - All() []T - Find(ID) T - Save(T) error + All(context.Context) []T + Find(context.Context, ID) T + Save(context.Context, T) error } |
