mirror of
https://gitlab.com/psuapp/psu.git
synced 2024-08-30 18:12:34 +00:00
Rename PortainerClient.GetEndpointGroups() to EndpointGroupList()
This commit is contained in:
parent
0adb18bc8a
commit
623788b624
@ -38,7 +38,7 @@ type PortainerClient interface {
|
||||
EndpointList() ([]portainer.Endpoint, error)
|
||||
|
||||
// Get endpoint groups
|
||||
GetEndpointGroups() ([]portainer.EndpointGroup, error)
|
||||
EndpointGroupList() ([]portainer.EndpointGroup, error)
|
||||
|
||||
// Get stacks, optionally filtered by swarmId and endpointId
|
||||
GetStacks(swarmID string, endpointID portainer.EndpointID) ([]portainer.Stack, error)
|
||||
@ -226,7 +226,7 @@ func (n *portainerClientImp) EndpointList() (endpoints []portainer.Endpoint, err
|
||||
return
|
||||
}
|
||||
|
||||
func (n *portainerClientImp) GetEndpointGroups() (endpointGroups []portainer.EndpointGroup, err error) {
|
||||
func (n *portainerClientImp) EndpointGroupList() (endpointGroups []portainer.EndpointGroup, err error) {
|
||||
err = n.doJSONWithToken("endpoint_groups", http.MethodGet, http.Header{}, nil, &endpointGroups)
|
||||
return
|
||||
}
|
||||
|
@ -30,7 +30,7 @@ var endpointGroupListCmd = &cobra.Command{
|
||||
common.CheckError(err)
|
||||
|
||||
logrus.Debug("Getting endpoint groups")
|
||||
endpointGroups, err := client.GetEndpointGroups()
|
||||
endpointGroups, err := client.EndpointGroupList()
|
||||
common.CheckError(err)
|
||||
|
||||
switch viper.GetString("endpoint.group.list.format") {
|
||||
|
@ -107,7 +107,7 @@ func GetEndpointGroupByName(name string) (endpointGroup portainer.EndpointGroup,
|
||||
return
|
||||
}
|
||||
|
||||
endpointGroups, err := portainerClient.GetEndpointGroups()
|
||||
endpointGroups, err := portainerClient.EndpointGroupList()
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user