MCPcopy Index your code
hub / github.com/APIParkLab/APIPark / ImportAll

Method ImportAll

controller/system/import.go:66–116  ·  view source on GitHub ↗
(ctx *gin.Context)

Source from the content-addressed store, hash-verified

64}
65
66func (i *imlImportConfigController) ImportAll(ctx *gin.Context) error {
67 return i.transaction.Transaction(ctx, func(transCtx context.Context) error {
68 err := i.importTeams(transCtx)
69 if err != nil {
70 return err
71 }
72
73 err = i.importCatalogues(transCtx)
74 if err != nil {
75 return err
76 }
77
78 err = i.importServices(transCtx)
79 if err != nil {
80 return err
81 }
82
83 err = i.importApplications(transCtx)
84 if err != nil {
85 return err
86 }
87
88 err = i.importApplicationAuth(transCtx)
89 if err != nil {
90 return err
91 }
92
93 err = i.importApis(transCtx)
94 if err != nil {
95 return err
96 }
97
98 err = i.importUpstreams(transCtx)
99 if err != nil {
100 return err
101 }
102
103 err = i.publish(transCtx)
104 if err != nil {
105 return err
106 }
107
108 err = i.importSubscribers(transCtx)
109 if err != nil {
110 return err
111 }
112
113 return nil
114 })
115
116}
117
118func (i *imlImportConfigController) importTeams(ctx context.Context) error {
119 data, err := unmarshal[team_dto.ExportTeam]("team")

Callers

nothing calls this directly

Calls 9

importTeamsMethod · 0.95
importCataloguesMethod · 0.95
importServicesMethod · 0.95
importApplicationsMethod · 0.95
importApplicationAuthMethod · 0.95
importApisMethod · 0.95
importUpstreamsMethod · 0.95
publishMethod · 0.95
importSubscribersMethod · 0.95

Tested by

no test coverage detected