-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtypes.go
53 lines (41 loc) · 942 Bytes
/
types.go
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
51
52
53
package mschartgen
// TODO: currently unused
type People struct {
Persons []Person `json:"value"`
}
// phase 1: these types are binded to the msgraph api (data fetch stage)
type Organization struct {
Data []OrgMetaData `json:"value"`
}
type OrgMetaData struct {
DisplayName string `json:"displayName"`
}
type Person struct {
Id string `json:"id"`
Name string `json:"displayName"`
Title string `json:"jobTitle"`
DirectReports []Person
}
type DirectReports struct {
Data []Person `json:"value"`
}
// phase 2: these types are the native data structures
type Organisation struct {
Name string
Head Member
}
type Member struct {
Id string
Name string
Title string
DirectReports []Member
}
// phase 3: these types are for post-processing to orgchart js
type OrgChart struct {
Data []Child
}
type Child struct {
Name string
Title string
Children []Child
}