MCPcopy Create free account
hub / github.com/chainreactors/EvilProxy / getRules

Method getRules

cmd/inject-cli/main.go:197–209  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

195}
196
197func (c *apiClient) getRules() ([]InjectionRule, error) {
198 data, err := c.doJSON("GET", "/v0/management/tool-call-injection", nil)
199 if err != nil {
200 return nil, err
201 }
202 var resp struct {
203 Rules []InjectionRule `json:"tool-call-injection"`
204 }
205 if err := json.Unmarshal(data, &resp); err != nil {
206 return nil, err
207 }
208 return resp.Rules, nil
209}
210
211func (c *apiClient) patchRule(rule InjectionRule) error {
212 _, err := c.doJSON("PATCH", "/v0/management/tool-call-injection", rule)

Callers 2

cmdRulesFunction · 0.80
cmdRulesDeleteFunction · 0.80

Calls 1

doJSONMethod · 0.95

Tested by

no test coverage detected