diff --git a/client/client.go b/client/client.go index 1a63bf6..8637ffb 100644 --- a/client/client.go +++ b/client/client.go @@ -19,7 +19,7 @@ type StackListFilter struct { EndpointId uint32 `json:",omitempty"` } -type ClientConfig struct { +type Config struct { Url string User string Password string @@ -277,7 +277,7 @@ func (n *PortainerClientImp) GetStatus() (status Status, err error) { } // Create a new client -func NewClient(httpClient *http.Client, config ClientConfig) (c PortainerClient, err error) { +func NewClient(httpClient *http.Client, config Config) (c PortainerClient, err error) { apiUrl, err := url.Parse(strings.TrimRight(config.Url, "/") + "/api/") if err != nil { return diff --git a/common/client.go b/common/client.go index 2f910f5..191637d 100644 --- a/common/client.go +++ b/common/client.go @@ -28,8 +28,8 @@ func GetDefaultClient() (c client.PortainerClient, err error) { } // Get the default config for a client -func GetDefaultClientConfig() client.ClientConfig { - return client.ClientConfig{ +func GetDefaultClientConfig() client.Config { + return client.Config{ Url: viper.GetString("url"), User: viper.GetString("user"), Password: viper.GetString("password"),