mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-06-19 13:28:58 -04:00
Bumps [github.com/testcontainers/testcontainers-go/modules/opensearch](https://github.com/testcontainers/testcontainers-go) from 0.41.0 to 0.42.0. - [Release notes](https://github.com/testcontainers/testcontainers-go/releases) - [Commits](https://github.com/testcontainers/testcontainers-go/compare/v0.41.0...v0.42.0) --- updated-dependencies: - dependency-name: github.com/testcontainers/testcontainers-go/modules/opensearch dependency-version: 0.42.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
32 lines
807 B
Go
32 lines
807 B
Go
package client
|
|
|
|
import (
|
|
"context"
|
|
"net/url"
|
|
)
|
|
|
|
// PluginDisableOptions holds parameters to disable plugins.
|
|
type PluginDisableOptions struct {
|
|
Force bool
|
|
}
|
|
|
|
// PluginDisableResult represents the result of a plugin disable operation.
|
|
type PluginDisableResult struct {
|
|
// Currently empty; can be extended in the future if needed.
|
|
}
|
|
|
|
// PluginDisable disables a plugin
|
|
func (cli *Client) PluginDisable(ctx context.Context, name string, options PluginDisableOptions) (PluginDisableResult, error) {
|
|
name, err := trimID("plugin", name)
|
|
if err != nil {
|
|
return PluginDisableResult{}, err
|
|
}
|
|
query := url.Values{}
|
|
if options.Force {
|
|
query.Set("force", "1")
|
|
}
|
|
resp, err := cli.post(ctx, "/plugins/"+name+"/disable", query, nil, nil)
|
|
defer ensureReaderClosed(resp)
|
|
return PluginDisableResult{}, err
|
|
}
|