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

Method DeleteAuthFile

internal/tui/client.go:154–166  ·  view source on GitHub ↗

DeleteAuthFile deletes a single auth file by name.

(name string)

Source from the content-addressed store, hash-verified

152
153// DeleteAuthFile deletes a single auth file by name.
154func (c *Client) DeleteAuthFile(name string) error {
155 query := url.Values{}
156 query.Set("name", name)
157 path := "/v0/management/auth-files?" + query.Encode()
158 _, code, err := c.doRequest("DELETE", path, nil)
159 if err != nil {
160 return err
161 }
162 if code >= 400 {
163 return fmt.Errorf("delete failed (HTTP %d)", code)
164 }
165 return nil
166}
167
168// ToggleAuthFile enables or disables an auth file.
169func (c *Client) ToggleAuthFile(name string, disabled bool) error {

Callers 1

handleConfirmInputMethod · 0.45

Calls 2

doRequestMethod · 0.95
SetMethod · 0.45

Tested by

no test coverage detected