mirror of
https://github.com/andwati/zitadel.git
synced 2026-12-05 10:28:52 +00:00
feat(domain): Instance APIs with relational tables (#10953)
# Which Problems Are Solved This PR implements the endpoints listed in https://github.com/zitadel/zitadel/issues/10443 . # How the Problems Are Solved The implementation follows the same pattern as the Organization one. There are no peculiarities to this PR. The `Update`, `Delete` are implementing the `Commander` interface, while `Get` and `List` instance(s) endpoints are implementing the `Querier` interace. # Additional Context - Closes #10443 - Depends on #10445
This commit is contained in:
@@ -27,6 +27,18 @@ func WithProjectRepo(repo ProjectRepository) InvokeOpt {
|
||||
}
|
||||
}
|
||||
|
||||
func WithInstanceRepo(repo InstanceRepository) InvokeOpt {
|
||||
return func(opts *InvokeOpts) {
|
||||
opts.instanceRepo = repo
|
||||
}
|
||||
}
|
||||
|
||||
func WithInstanceDomainRepo(repo InstanceDomainRepository) InvokeOpt {
|
||||
return func(opts *InvokeOpts) {
|
||||
opts.instanceDomainRepo = repo
|
||||
}
|
||||
}
|
||||
|
||||
// WithQueryExecutor sets the database client to be used by the command.
|
||||
// If not set, the default pool will be used.
|
||||
// This is mainly used for testing.
|
||||
@@ -59,6 +71,8 @@ type InvokeOpts struct {
|
||||
organizationRepo OrganizationRepository
|
||||
organizationDomainRepo OrganizationDomainRepository
|
||||
projectRepo ProjectRepository
|
||||
instanceRepo InstanceRepository
|
||||
instanceDomainRepo InstanceDomainRepository
|
||||
}
|
||||
|
||||
func (o *InvokeOpts) DB() database.QueryExecutor {
|
||||
|
||||
Reference in New Issue
Block a user