devselect

package
v0.0.0-...-9f4f02d Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Selector

type Selector func(windevice.Device) (bool, error)

A Selector is capable of matching devices in a device info list.

func All

func All(selectors ...Selector) Selector

All returns a selector that returns true when all selectors return true.

func Any

func Any(selectors ...Selector) Selector

Any returns a selector that returns true when any selector returns true.

func Class

func Class(matcher StringMatcher) Selector

Class returns a selector that matches device class names.

func Description

func Description(matcher StringMatcher) Selector

Description returns a selector that matches device descriptions.

func FriendlyName

func FriendlyName(matcher StringMatcher) Selector

FriendlyName returns a selector that matches device descriptions and friendly names.

func ID

func ID(matcher StringMatcher) Selector

ID returns a selector that matches device hardware identifiers.

func (Selector) Select

func (s Selector) Select(device windevice.Device) (bool, error)

Select returns true if the selector matches the given device.

type StringMatcher

type StringMatcher interface {
	Match(string) bool
}

StringMatcher is a function capable of matching strings.

Jump to

Keyboard shortcuts

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