mirror of
https://gitlab.com/psuapp/psu.git
synced 2024-08-30 18:12:34 +00:00
Add GetEndpointGroups() function to client
This commit is contained in:
parent
219adc5c76
commit
2261b4f6ac
@ -31,6 +31,9 @@ type PortainerClient interface {
|
|||||||
// Get endpoints
|
// Get endpoints
|
||||||
GetEndpoints() ([]EndpointSubset, error)
|
GetEndpoints() ([]EndpointSubset, error)
|
||||||
|
|
||||||
|
// Get endpoint groups
|
||||||
|
GetEndpointGroups() ([]EndpointGroup, error)
|
||||||
|
|
||||||
// Get stacks, optionally filtered by swarmId and endpointId
|
// Get stacks, optionally filtered by swarmId and endpointId
|
||||||
GetStacks(swarmId string, endpointId uint32) ([]Stack, error)
|
GetStacks(swarmId string, endpointId uint32) ([]Stack, error)
|
||||||
|
|
||||||
@ -217,6 +220,11 @@ func (n *portainerClientImp) GetEndpoints() (endpoints []EndpointSubset, err err
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (n *portainerClientImp) GetEndpointGroups() (endpointGroups []EndpointGroup, err error) {
|
||||||
|
err = n.doJSON("endpoint_groups", http.MethodGet, nil, &endpointGroups)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
func (n *portainerClientImp) GetStacks(swarmId string, endpointId uint32) (stacks []Stack, err error) {
|
func (n *portainerClientImp) GetStacks(swarmId string, endpointId uint32) (stacks []Stack, err error) {
|
||||||
filter := StackListFilter{
|
filter := StackListFilter{
|
||||||
SwarmId: swarmId,
|
SwarmId: swarmId,
|
||||||
|
Loading…
Reference in New Issue
Block a user