mirror of
https://gitlab.com/psuapp/psu.git
synced 2024-08-30 18:12:34 +00:00
Rename PortainerClient.GetEndpoints() to EndpointList()
This commit is contained in:
parent
53b13b1c76
commit
0adb18bc8a
@ -35,7 +35,7 @@ type PortainerClient interface {
|
||||
Auth() (token string, err error)
|
||||
|
||||
// Get endpoints
|
||||
GetEndpoints() ([]portainer.Endpoint, error)
|
||||
EndpointList() ([]portainer.Endpoint, error)
|
||||
|
||||
// Get endpoint groups
|
||||
GetEndpointGroups() ([]portainer.EndpointGroup, error)
|
||||
@ -221,7 +221,7 @@ func (n *portainerClientImp) Auth() (token string, err error) {
|
||||
return
|
||||
}
|
||||
|
||||
func (n *portainerClientImp) GetEndpoints() (endpoints []portainer.Endpoint, err error) {
|
||||
func (n *portainerClientImp) EndpointList() (endpoints []portainer.Endpoint, err error) {
|
||||
err = n.doJSONWithToken("endpoints", http.MethodGet, http.Header{}, nil, &endpoints)
|
||||
return
|
||||
}
|
||||
|
@ -30,7 +30,7 @@ var endpointListCmd = &cobra.Command{
|
||||
common.CheckError(err)
|
||||
|
||||
logrus.Debug("Getting endpoints")
|
||||
endpoints, err := client.GetEndpoints()
|
||||
endpoints, err := client.EndpointList()
|
||||
common.CheckError(err)
|
||||
|
||||
switch viper.GetString("endpoint.list.format") {
|
||||
|
@ -33,7 +33,7 @@ var stackListCmd = &cobra.Command{
|
||||
portainerClient, err := common.GetClient()
|
||||
common.CheckError(err)
|
||||
|
||||
endpoints, endpointsRetrievalErr := portainerClient.GetEndpoints()
|
||||
endpoints, endpointsRetrievalErr := portainerClient.EndpointList()
|
||||
common.CheckError(endpointsRetrievalErr)
|
||||
|
||||
var endpointSwarmClusterID string
|
||||
|
@ -38,7 +38,7 @@ func GetDefaultEndpoint() (endpoint portainer.Endpoint, err error) {
|
||||
}
|
||||
|
||||
logrus.Debug("Getting endpoints")
|
||||
endpoints, err := portainerClient.GetEndpoints()
|
||||
endpoints, err := portainerClient.EndpointList()
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
@ -85,7 +85,7 @@ func GetEndpointByName(name string) (endpoint portainer.Endpoint, err error) {
|
||||
return
|
||||
}
|
||||
|
||||
endpoints, err := portainerClient.GetEndpoints()
|
||||
endpoints, err := portainerClient.EndpointList()
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user