mirror of
https://github.com/netbirdio/netbird.git
synced 2026-04-27 20:56:44 +00:00
[management] Add support for filtering peers by name and IP (#3279)
* add peers ip and name filters Signed-off-by: bcmmbaga <bethuelmbaga12@gmail.com> * add get peers filter Signed-off-by: bcmmbaga <bethuelmbaga12@gmail.com> * fix get account peers Signed-off-by: bcmmbaga <bethuelmbaga12@gmail.com> * Extend GetAccountPeers store to support filtering by name and IP Signed-off-by: bcmmbaga <bethuelmbaga12@gmail.com> * Fix get peers references Signed-off-by: bcmmbaga <bethuelmbaga12@gmail.com> --------- Signed-off-by: bcmmbaga <bethuelmbaga12@gmail.com>
This commit is contained in:
@@ -2183,6 +2183,17 @@ paths:
|
||||
summary: List all Peers
|
||||
description: Returns a list of all peers
|
||||
tags: [ Peers ]
|
||||
parameters:
|
||||
- in: query
|
||||
name: name
|
||||
schema:
|
||||
type: string
|
||||
description: Filter peers by name
|
||||
- in: query
|
||||
name: ip
|
||||
schema:
|
||||
type: string
|
||||
description: Filter peers by IP address
|
||||
security:
|
||||
- BearerAuth: [ ]
|
||||
- TokenAuth: [ ]
|
||||
|
||||
@@ -1580,6 +1580,15 @@ type UserRequest struct {
|
||||
Role string `json:"role"`
|
||||
}
|
||||
|
||||
// GetApiPeersParams defines parameters for GetApiPeers.
|
||||
type GetApiPeersParams struct {
|
||||
// Name Filter peers by name
|
||||
Name *string `form:"name,omitempty" json:"name,omitempty"`
|
||||
|
||||
// Ip Filter peers by IP address
|
||||
Ip *string `form:"ip,omitempty" json:"ip,omitempty"`
|
||||
}
|
||||
|
||||
// GetApiPeersPeerIdIngressPortsParams defines parameters for GetApiPeersPeerIdIngressPorts.
|
||||
type GetApiPeersPeerIdIngressPortsParams struct {
|
||||
// Name Filters ingress port allocations by name
|
||||
|
||||
Reference in New Issue
Block a user