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

Method SubscribersByProject

service/subscribe/iml.go:94–106  ·  view source on GitHub ↗
(ctx context.Context, serviceIds ...string)

Source from the content-addressed store, hash-verified

92}
93
94func (i *imlSubscribeService) SubscribersByProject(ctx context.Context, serviceIds ...string) ([]*Subscribe, error) {
95 w := make(map[string]interface{})
96 if len(serviceIds) > 0 {
97 w["service"] = serviceIds
98 }
99
100 w["apply_status"] = ApplyStatusSubscribe
101 list, err := i.store.List(ctx, w, "create_at desc")
102 if err != nil {
103 return nil, err
104 }
105 return utils.SliceToSlice(list, FromEntity), nil
106}
107
108func (i *imlSubscribeService) Subscribers(ctx context.Context, service string, status int) ([]*Subscribe, error) {
109 list, err := i.store.List(ctx, map[string]interface{}{"apply_status": status, "service": service}, "create_at desc")

Callers

nothing calls this directly

Calls 1

ListMethod · 0.65

Tested by

no test coverage detected