routeselector

package
v0.34.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 5, 2024 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

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

func (rs *RouteSelector) DeselectRoutes(routes []route.NetID, allRoutes []route.NetID) error

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL