From bde038733870cd4160a2c785209cad80d9a6a5f4 Mon Sep 17 00:00:00 2001 From: adlerhurst <27845747+adlerhurst@users.noreply.github.com> Date: Thu, 27 Feb 2025 09:04:43 +0100 Subject: [PATCH] funcs --- backend/repository/instance.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/backend/repository/instance.go b/backend/repository/instance.go index 5ba6e7d749..7403f769b1 100644 --- a/backend/repository/instance.go +++ b/backend/repository/instance.go @@ -13,18 +13,26 @@ type Instance struct { Name string } +type SetUpInstance func(ctx context.Context, instance *Instance) error + type InstanceSetuper interface { SetUp(ctx context.Context, instance *Instance) error } +type InstanceByID func(ctx context.Context, id string) (*Instance, error) + type instanceByIDQuerier interface { ByID(ctx context.Context, id string) (*Instance, error) } +type InstanceByDomain func(ctx context.Context, domain string) (*Instance, error) + type instanceByDomainQuerier interface { ByDomain(ctx context.Context, domain string) (*Instance, error) } +type ListInstances func(ctx context.Context) ([]*Instance, error) + type InstanceLister interface { List(ctx context.Context) ([]*Instance, error) }