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

Method importUpstreams

controller/system/import.go:320–332  ·  view source on GitHub ↗
(ctx context.Context)

Source from the content-addressed store, hash-verified

318}
319
320func (i *imlImportConfigController) importUpstreams(ctx context.Context) error {
321 data, err := unmarshal[upstream_dto.ExportUpstream]("upstream")
322 if err != nil {
323 return err
324 }
325 for _, d := range data {
326 _, err = i.upstreamModule.Save(ctx, d.Service, d.Upstream)
327 if err != nil {
328 return fmt.Errorf("update upstream(%s) error: %v", d.Service, err)
329 }
330 }
331 return nil
332}
333
334func (i *imlImportConfigController) importApplicationAuth(ctx context.Context) error {
335 data, err := unmarshal[application_authorization_dto.ExportAuthorization]("authorization")

Callers 1

ImportAllMethod · 0.95

Calls 1

SaveMethod · 0.65

Tested by

no test coverage detected