MCPcopy Create free account
hub / github.com/APIParkLab/APIPark / ExportAll

Method ExportAll

module/subscribe/iml.go:49–64  ·  view source on GitHub ↗
(ctx context.Context)

Source from the content-addressed store, hash-verified

47}
48
49func (i *imlSubscribeModule) ExportAll(ctx context.Context) ([]*subscribe_dto.ExportSubscriber, error) {
50 list, err := i.subscribeService.List(ctx)
51 if err != nil {
52 return nil, err
53 }
54
55 return utils.SliceToSlice(list, func(s *subscribe.Subscribe) *subscribe_dto.ExportSubscriber {
56 return &subscribe_dto.ExportSubscriber{
57 Id: s.Id,
58 Service: s.Service,
59 Subscriber: s.Application,
60 Applier: s.Applier,
61 From: s.From,
62 }
63 }), nil
64}
65
66func (i *imlSubscribeModule) getSubscribers(ctx context.Context, serviceIds []string) ([]*gateway.SubscribeRelease, error) {
67 subscribers, err := i.subscribeService.SubscribersByProject(ctx, serviceIds...)

Callers

nothing calls this directly

Calls 1

ListMethod · 0.65

Tested by

no test coverage detected