crosconfig

package
v0.0.0-...-9474aff Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2022 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Overview

Package crosconfig provides hardware-specific methods for interacting with the cros_config command line utility. See https://chromium.googlesource.com/chromiumos/platform2/+/HEAD/chromeos-config for more information about cros_config.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckHardwareProperty

func CheckHardwareProperty(ctx context.Context, prop HardwareProperty) (bool, error)

CheckHardwareProperty returns true if the given hardware property is set to true and it returns false if the property is set to false or not set.

Types

type HardwareProperty

type HardwareProperty string

HardwareProperty represents an attribute in /hardware-properties. https://chromium.googlesource.com/chromiumos/platform2/+/HEAD/chromeos-config#hardware_properties

const (
	// HasBaseAccelerometer is a bool property describing whether the DUT has an
	// accelerometer in its base.
	HasBaseAccelerometer HardwareProperty = "has-base-accelerometer"
	// HasBaseGyroscope is a bool property describing whether the DUT has an
	// gyroscope in its base.
	HasBaseGyroscope HardwareProperty = "has-base-gyroscope"
	// HasBaseMagnetometer is a bool property describing whether the DUT has an
	// magnetometer in its base.
	HasBaseMagnetometer HardwareProperty = "has-base-magnetometer"
	// HasBaseLightSensor is a bool property describing whether the DUT has an
	// light sensor in its base.
	HasBaseLightSensor HardwareProperty = "has-base-light-sensor"
	// HasLidAccelerometer is a bool property describing whether the DUT has an
	// accelerometer in its lid.
	HasLidAccelerometer HardwareProperty = "has-lid-accelerometer"
	// HasLidGyroscope is a bool property describing whether the DUT has an
	// gyroscope in its lid.
	HasLidGyroscope HardwareProperty = "has-lid-gyroscope"
	// HasLidMagnetometer is a bool property describing whether the DUT has an
	// magnetometer in its lid.
	HasLidMagnetometer HardwareProperty = "has-lid-magnetometer"
	// HasLidLightSensor is a bool property describing whether the DUT has an
	// light sensor in its lid.
	HasLidLightSensor HardwareProperty = "has-lid-light-sensor"
)

Jump to

Keyboard shortcuts

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