----- Config field update methods ----- PutBoolField updates a boolean config field.
(path string, value bool)
| 369 | |
| 370 | // PutBoolField updates a boolean config field. |
| 371 | func (c *Client) PutBoolField(path string, value bool) error { |
| 372 | body, _ := json.Marshal(map[string]any{"value": value}) |
| 373 | _, err := c.put("/v0/management/"+path, strings.NewReader(string(body))) |
| 374 | return err |
| 375 | } |
| 376 | |
| 377 | // PutIntField updates an integer config field. |
| 378 | func (c *Client) PutIntField(path string, value int) error { |