()
| 195 | } |
| 196 | |
| 197 | func (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 | |
| 211 | func (c *apiClient) patchRule(rule InjectionRule) error { |
| 212 | _, err := c.doJSON("PATCH", "/v0/management/tool-call-injection", rule) |
no test coverage detected