Skip to content

Commit

Permalink
create stubs for CreateTenantUser
Browse files Browse the repository at this point in the history
  • Loading branch information
briskt committed Nov 17, 2023
1 parent 45d7064 commit 5b8ce60
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
8 changes: 8 additions & 0 deletions app/tenant.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ type TenantService interface {

// DeleteTenant permanently deletes a tenant and all child objects
DeleteTenant(ctx echo.Context, id string) error

// CreateTenantUser creates a new tenant user
CreateTenantUser(ctx echo.Context, input TenantUserCreateInput) error
}

// Tenant is the full model that identifies an app Tenant
Expand Down Expand Up @@ -76,3 +79,8 @@ func (tu *TenantUpdateInput) Validate() error {
}
return nil
}

// TenantUserCreateInput is a set of fields to define a new tenant user for CreateTenantUser()
type TenantUserCreateInput struct {
Name string
}
5 changes: 5 additions & 0 deletions db/tenant.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,11 @@ func (s *TenantService) DeleteTenant(ctx echo.Context, id string) error {
return nil
}

// CreateTenantUser permanently deletes a tenant and all child objects
func (s *TenantService) CreateTenantUser(ctx echo.Context, input app.TenantUserCreateInput) error {
return nil
}

// findTenantByID is a helper function to fetch a tenant by ID.
func findTenantByID(ctx echo.Context, id string) (Tenant, error) {
var tenant Tenant
Expand Down

0 comments on commit 5b8ce60

Please sign in to comment.