From c82468b1b32ad5bfb347fe65cd5dcfb6680795d1 Mon Sep 17 00:00:00 2001 From: mo khan Date: Wed, 7 May 2025 10:47:31 -0700 Subject: refactor: provide context to repository to apply timeout --- app/domain/repository.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'app/domain') 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 } -- cgit v1.2.3