mirror of
https://gitlab.com/psuapp/psu.git
synced 2025-07-25 04:42:26 +00:00
Rename PortainerClient.GetStatus() to Status()
This commit is contained in:
@ -62,7 +62,7 @@ type PortainerClient interface {
|
|||||||
EndpointDockerInfo(endpointID portainer.EndpointID) (info map[string]interface{}, err error)
|
EndpointDockerInfo(endpointID portainer.EndpointID) (info map[string]interface{}, err error)
|
||||||
|
|
||||||
// Get Portainer status info
|
// Get Portainer status info
|
||||||
GetStatus() (portainer.Status, error)
|
Status() (portainer.Status, error)
|
||||||
|
|
||||||
// Run a function before sending a request to Portainer
|
// Run a function before sending a request to Portainer
|
||||||
BeforeRequest(hook func(req *http.Request) (err error))
|
BeforeRequest(hook func(req *http.Request) (err error))
|
||||||
@ -301,7 +301,7 @@ func (n *portainerClientImp) EndpointDockerInfo(endpointID portainer.EndpointID)
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
func (n *portainerClientImp) GetStatus() (status portainer.Status, err error) {
|
func (n *portainerClientImp) Status() (status portainer.Status, err error) {
|
||||||
err = n.doJSONWithToken("status", http.MethodGet, http.Header{}, nil, &status)
|
err = n.doJSONWithToken("status", http.MethodGet, http.Header{}, nil, &status)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -26,7 +26,7 @@ var statusCmd = &cobra.Command{
|
|||||||
client, err := common.GetClient()
|
client, err := common.GetClient()
|
||||||
common.CheckError(err)
|
common.CheckError(err)
|
||||||
|
|
||||||
respBody, err := client.GetStatus()
|
respBody, err := client.Status()
|
||||||
common.CheckError(err)
|
common.CheckError(err)
|
||||||
|
|
||||||
switch viper.GetString("status.format") {
|
switch viper.GetString("status.format") {
|
||||||
|
Reference in New Issue
Block a user