Documentation ¶
Index ¶
- type RouteSelector
- func (rs *RouteSelector) DeselectAllRoutes()
- func (rs *RouteSelector) DeselectRoutes(routes []route.NetID, allRoutes []route.NetID) error
- func (rs *RouteSelector) FilterSelected(routes route.HAMap) route.HAMap
- func (rs *RouteSelector) IsSelected(routeID route.NetID) bool
- func (rs *RouteSelector) MarshalJSON() ([]byte, error)
- func (rs *RouteSelector) SelectAllRoutes()
- func (rs *RouteSelector) SelectRoutes(routes []route.NetID, appendRoute bool, allRoutes []route.NetID) error
- func (rs *RouteSelector) UnmarshalJSON(data []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RouteSelector ¶
type RouteSelector struct {
// contains filtered or unexported fields
}
func NewRouteSelector ¶
func NewRouteSelector() *RouteSelector
func (*RouteSelector) DeselectAllRoutes ¶
func (rs *RouteSelector) DeselectAllRoutes()
DeselectAllRoutes deselects all routes, effectively disabling route selection.
func (*RouteSelector) DeselectRoutes ¶
DeselectRoutes removes specific routes from the selection. If the selector is in "select all" mode, it will transition to "select specific" mode.
func (*RouteSelector) FilterSelected ¶
func (rs *RouteSelector) FilterSelected(routes route.HAMap) route.HAMap
FilterSelected removes unselected routes from the provided map.
func (*RouteSelector) IsSelected ¶
func (rs *RouteSelector) IsSelected(routeID route.NetID) bool
IsSelected checks if a specific route is selected.
func (*RouteSelector) MarshalJSON ¶ added in v0.34.0
func (rs *RouteSelector) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaler interface
func (*RouteSelector) SelectAllRoutes ¶
func (rs *RouteSelector) SelectAllRoutes()
SelectAllRoutes sets the selector to select all routes.
func (*RouteSelector) SelectRoutes ¶
func (rs *RouteSelector) SelectRoutes(routes []route.NetID, appendRoute bool, allRoutes []route.NetID) error
SelectRoutes updates the selected routes based on the provided route IDs.
func (*RouteSelector) UnmarshalJSON ¶ added in v0.34.0
func (rs *RouteSelector) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaler interface If the JSON is empty or null, it will initialize like a NewRouteSelector.