query

package
v0.0.0-...-bf7e782 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrConditionInvalid    = errors.New("invalid condition")
	ErrOperatorInvalid     = errors.New("invalid operator")
	ErrPropertyInvalid     = errors.New("invalid device property")
	ErrServiceStateInvalid = errors.New("invalid service state")

	ErrNoEmptyFields = errors.New("fields should not be empty")
)

Functions

func DeviceMatchesQuery

func DeviceMatchesQuery(deps QueryDependencies, device models.Device, query models.Query) (bool, error)

func FiltersFromQuery

func FiltersFromQuery(query map[string][]string) ([]models.Filter, error)

func QueryDevices

func QueryDevices(deps QueryDependencies, devices []models.Device, query models.Query) (selectedDevices []models.Device, unselectedDevices []models.Device, err error)

func ValidateQuery

func ValidateQuery(query models.Query) error

Types

type QueryDependencies

type QueryDependencies struct {
	DeviceApplicationStatuses map[string]map[string]*models.DeviceApplicationStatus
	DeviceServiceStates       map[string]map[string]map[string]*models.DeviceServiceState
	Releases                  store.Releases
	Context                   context.Context
}

Jump to

Keyboard shortcuts

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