get / list implemented

This commit is contained in:
adlerhurst
2025-07-17 15:32:50 +02:00
parent 65cd4ec668
commit bb2d0aff3f
8 changed files with 168 additions and 53 deletions

View File

@@ -52,6 +52,14 @@ type InstanceDomainRepository interface {
instanceDomainConditions
instanceDomainChanges
// Get returns a single domain based on the criteria.
// If no domain is found, it returns an error of type [database.ErrNotFound].
// If multiple domains are found, it returns an error of type [database.ErrMultipleRows].
Get(ctx context.Context, opts ...database.QueryOption) (*InstanceDomain, error)
// List returns a list of domains based on the criteria.
// If no domains are found, it returns an empty slice.
List(ctx context.Context, opts ...database.QueryOption) ([]*InstanceDomain, error)
// Add adds a new domain to the instance.
Add(ctx context.Context, domain *AddInstanceDomain) error
// Update updates an existing domain in the instance.