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
846 B
Go
32 lines
846 B
Go
package client
|
|
|
|
import (
|
|
"context"
|
|
"io"
|
|
"net/http"
|
|
"net/url"
|
|
)
|
|
|
|
// PluginCreateOptions hold all options to plugin create.
|
|
type PluginCreateOptions struct {
|
|
RepoName string
|
|
}
|
|
|
|
// PluginCreateResult represents the result of a plugin create operation.
|
|
type PluginCreateResult struct {
|
|
// Currently empty; can be extended in the future if needed.
|
|
}
|
|
|
|
// PluginCreate creates a plugin
|
|
func (cli *Client) PluginCreate(ctx context.Context, createContext io.Reader, createOptions PluginCreateOptions) (PluginCreateResult, error) {
|
|
headers := http.Header(make(map[string][]string))
|
|
headers.Set("Content-Type", "application/x-tar")
|
|
|
|
query := url.Values{}
|
|
query.Set("name", createOptions.RepoName)
|
|
|
|
resp, err := cli.postRaw(ctx, "/plugins/create", query, createContext, headers)
|
|
defer ensureReaderClosed(resp)
|
|
return PluginCreateResult{}, err
|
|
}
|