From 6c4f91b0b871366426c0cad99377d6ae55f8f0c3 Mon Sep 17 00:00:00 2001 From: lash Date: Sun, 3 Nov 2024 23:10:44 +0000 Subject: [PATCH] Implement storageservice in nats subscription object --- internal/testutil/service.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/internal/testutil/service.go b/internal/testutil/service.go index da2b71f..a7c26a1 100644 --- a/internal/testutil/service.go +++ b/internal/testutil/service.go @@ -9,22 +9,27 @@ import ( "git.defalsify.org/vise.git/db" ) +// TestStorageService wraps db for nats subscription. type TestStorageService struct { Store db.Db } - + +// GetUserdataDb implements urdt/ussd/common.StorageServices. func(ss *TestStorageService) GetUserdataDb(ctx context.Context) (db.Db, error) { return ss.Store, nil } +// GetPersister implements urdt/ussd/common.StorageServices. func(ts *TestStorageService) GetPersister(ctx context.Context) (*persist.Persister, error) { return nil, errors.New("not implemented") } +// GetResource implements urdt/ussd/common.StorageServices. func(ts *TestStorageService) GetResource(ctx context.Context) (resource.Resource, error) { return nil, errors.New("not implemented") } +// EnsureDbDir implements urdt/ussd/common.StorageServices. func(ss *TestStorageService) EnsureDbDir() error { return nil }