From d7117239d3296a5f95ff249f309e33e20292eb02 Mon Sep 17 00:00:00 2001 From: Prabhjot Singh Sethi Date: Sun, 27 Apr 2025 21:51:56 +0000 Subject: [PATCH] Test generic struct type Signed-off-by: Prabhjot Singh Sethi --- db/store.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/db/store.go b/db/store.go index 35f5407..913005d 100644 --- a/db/store.go +++ b/db/store.go @@ -81,3 +81,11 @@ type StoreClient interface { // considered healthy HealthCheck(ctx context.Context) error } + +type StoreCollectionTable[K any, E any] struct { + Col StoreCollection +} + +func (t *StoreCollectionTable[K, E]) Insert(ctx context.Context, key K, entry E) error { + return t.Col.InsertOne(ctx, key, entry) +}