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

Method SubscriptionsByApplication

service/subscribe/iml.go:75–87  ·  view source on GitHub ↗
(ctx context.Context, applicationIds ...string)

Source from the content-addressed store, hash-verified

73}
74
75func (i *imlSubscribeService) SubscriptionsByApplication(ctx context.Context, applicationIds ...string) ([]*Subscribe, error) {
76 w := make(map[string]interface{})
77 if len(applicationIds) > 0 {
78 w["application"] = applicationIds
79 }
80
81 //w["apply_status"] = ApplyStatusSubscribe
82 list, err := i.store.List(ctx, w, "create_at desc")
83 if err != nil {
84 return nil, err
85 }
86 return utils.SliceToSlice(list, FromEntity), nil
87}
88
89func (i *imlSubscribeService) DeleteByApplication(ctx context.Context, service string, application string) error {
90 _, err := i.store.DeleteWhere(ctx, map[string]interface{}{"service": service, "application": application})

Callers

nothing calls this directly

Calls 1

ListMethod · 0.65

Tested by

no test coverage detected