mirror of
https://gitlab.com/psuapp/psu.git
synced 2024-08-30 18:12:34 +00:00
Move clientConfig declaration to the top
This commit is contained in:
parent
8d0fb72034
commit
04a05fad86
@ -17,6 +17,15 @@ import (
|
|||||||
|
|
||||||
var client *PortainerClient
|
var client *PortainerClient
|
||||||
|
|
||||||
|
type clientConfig struct {
|
||||||
|
Url string
|
||||||
|
User string
|
||||||
|
Password string
|
||||||
|
Token string
|
||||||
|
Insecure bool
|
||||||
|
Timeout time.Duration
|
||||||
|
}
|
||||||
|
|
||||||
type PortainerClient struct {
|
type PortainerClient struct {
|
||||||
http.Client
|
http.Client
|
||||||
url *url.URL
|
url *url.URL
|
||||||
@ -238,15 +247,6 @@ func (n *PortainerClient) GetStatus() (status Status, err error) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
type clientConfig struct {
|
|
||||||
Url string
|
|
||||||
User string
|
|
||||||
Password string
|
|
||||||
Token string
|
|
||||||
Insecure bool
|
|
||||||
Timeout time.Duration
|
|
||||||
}
|
|
||||||
|
|
||||||
// Create a new client
|
// Create a new client
|
||||||
func newClient(config clientConfig) (c *PortainerClient, err error) {
|
func newClient(config clientConfig) (c *PortainerClient, err error) {
|
||||||
apiUrl, err := url.Parse(config.Url + "/api/")
|
apiUrl, err := url.Parse(config.Url + "/api/")
|
||||||
|
Loading…
Reference in New Issue
Block a user