-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
catalog.go
56 lines (43 loc) · 1.81 KB
/
catalog.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
54
55
56
package backstage
// catalogService handles communication with Backstage catalog API.
type catalogService struct {
service
// Entities handles communication with the Backstage entities endpoints in Backstage Catalog API.
Entities *entityService
// APIs handles communication with the API related methods of the Backstage Catalog API.
APIs *apiService
// Components handles communication with the Component related methods of the Backstage Catalog API.
Components *componentService
// Domains handles communication with the Domain related methods of the Backstage Catalog API.
Domains *domainService
// Groups handles communication with the Group related methods of the Backstage Catalog API.
Groups *groupService
// Locations handles communication with the Location related methods of the Backstage Catalog API.
Locations *locationService
// Resources handles communication with the Resource related methods of the Backstage Catalog API.
Resources *resourceService
// Systems handles communication with the System related methods of the Backstage Catalog API.
Systems *systemService
// Users handles communication with the User related methods of the Backstage Catalog API.
Users *userService
}
// newCatalogService returns a new instance of catalogService.
func newCatalogService(c *Client) *catalogService {
const catalogApiPath = "/catalog"
s := &catalogService{
service: service{
client: c,
apiPath: catalogApiPath,
},
}
s.Entities = newEntityService(s)
s.APIs = newApiService(s.Entities)
s.Components = newComponentService(s.Entities)
s.Domains = newDomainService(s.Entities)
s.Groups = newGroupService(s.Entities)
s.Locations = newLocationService(s.Entities)
s.Resources = newResourceService(s.Entities)
s.Systems = newSystemService(s.Entities)
s.Users = newUserService(s.Entities)
return s
}