-
Notifications
You must be signed in to change notification settings - Fork 0
/
domain.puml
50 lines (42 loc) · 1.24 KB
/
domain.puml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
@startuml
class Tenant {
<<valueObject>>
- id: string
- name: string
}
class Namespace {
<<valueObject>>
- name: string
}
class TenantRepository {
- tenants: map[string]Tenant
+ CreateTenant(tenant: *Tenant) error
+ GetTenant(id: string) (*Tenant, error)
}
class NamespaceRepository {
- namespaces: map[string]map[string]Namespace
+ CreateNamespace(tenantID string, namespace: *Namespace) error
+ GetAllNamespaces(tenantID string) ([]Namespace, error)
+ GetNamespace(tenantID string, name string) (*Namespace, error)
}
class TenantService {
- tenantRepository: *TenantRepository
+ CreateTenant(tenant: *Tenant) error
+ GetTenant(id: string) (*Tenant, error)
}
class NamespaceService {
- namespaceRepository: *NamespaceRepository
+ CreateNamespace(tenantID string, namespace: *Namespace) error
+ GetAllNamespaces(tenantID string) ([]Namespace, error)
+ GetNamespace(tenantID string, name string) (*Namespace, error)
}
TenantRepository --> Tenant
NamespaceRepository --> Namespace
TenantService --> TenantRepository
NamespaceService --> NamespaceRepository
NamespaceService --> Namespace
NamespaceService --> Tenant
TenantHandler --> TenantService
NamespaceHandler --> NamespaceService
NamespaceHandler --> Tenant
@enduml