MCPcopy Create free account
hub / github.com/daodst/chat / pushRuleIndexByID

Function pushRuleIndexByID

clientapi/routing/pushrules.go:317–324  ·  view source on GitHub ↗
(rules []*pushrules.Rule, id string)

Source from the content-addressed store, hash-verified

315}
316
317func pushRuleIndexByID(rules []*pushrules.Rule, id string) int {
318 for i, rule := range rules {
319 if rule.RuleID == id {
320 return i
321 }
322 }
323 return -1
324}
325
326func pushRuleAttrGetter(attr string) (func(*pushrules.Rule) interface{}, error) {
327 switch attr {

Callers 5

GetPushRuleByRuleIDFunction · 0.85
PutPushRuleByRuleIDFunction · 0.85
DeletePushRuleByRuleIDFunction · 0.85
GetPushRuleAttrByRuleIDFunction · 0.85
PutPushRuleAttrByRuleIDFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected