This commit is contained in:
adlerhurst
2025-02-27 09:04:43 +01:00
parent fb3b451d4d
commit bde0387338

View File

@@ -13,18 +13,26 @@ type Instance struct {
Name string Name string
} }
type SetUpInstance func(ctx context.Context, instance *Instance) error
type InstanceSetuper interface { type InstanceSetuper interface {
SetUp(ctx context.Context, instance *Instance) error SetUp(ctx context.Context, instance *Instance) error
} }
type InstanceByID func(ctx context.Context, id string) (*Instance, error)
type instanceByIDQuerier interface { type instanceByIDQuerier interface {
ByID(ctx context.Context, id string) (*Instance, error) ByID(ctx context.Context, id string) (*Instance, error)
} }
type InstanceByDomain func(ctx context.Context, domain string) (*Instance, error)
type instanceByDomainQuerier interface { type instanceByDomainQuerier interface {
ByDomain(ctx context.Context, domain string) (*Instance, error) ByDomain(ctx context.Context, domain string) (*Instance, error)
} }
type ListInstances func(ctx context.Context) ([]*Instance, error)
type InstanceLister interface { type InstanceLister interface {
List(ctx context.Context) ([]*Instance, error) List(ctx context.Context) ([]*Instance, error)
} }