mirror of
https://github.com/moby/moby.git
synced 2026-08-13 17:06:44 +00:00
Add missing Go doc comments to the exported option and result types in config_remove.go, config_update.go, secret_remove.go, secret_update.go, node_inspect.go, node_list.go, node_remove.go, and node_update.go. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: Poyraz Küçükarslan <83272398+PoyrazK@users.noreply.github.com>
28 lines
727 B
Go
28 lines
727 B
Go
package client
|
|
|
|
import "context"
|
|
|
|
// SecretRemoveOptions holds options for [Client.SecretRemove].
|
|
type SecretRemoveOptions struct {
|
|
// Add future optional parameters here
|
|
}
|
|
|
|
// SecretRemoveResult holds the result of [Client.SecretRemove].
|
|
type SecretRemoveResult struct {
|
|
// Add future fields here
|
|
}
|
|
|
|
// SecretRemove removes a secret.
|
|
func (cli *Client) SecretRemove(ctx context.Context, id string, options SecretRemoveOptions) (SecretRemoveResult, error) {
|
|
id, err := trimID("secret", id)
|
|
if err != nil {
|
|
return SecretRemoveResult{}, err
|
|
}
|
|
resp, err := cli.delete(ctx, "/secrets/"+id, nil, nil)
|
|
defer ensureReaderClosed(resp)
|
|
if err != nil {
|
|
return SecretRemoveResult{}, err
|
|
}
|
|
return SecretRemoveResult{}, nil
|
|
}
|