common

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2023 License: Apache-2.0 Imports: 7 Imported by: 1

Documentation

Index

Constants

View Source
const (
	Version     = "0.4.1"
	ServiceName = "local-storage"
)
View Source
const (
	UITypeNotificationStyle1 = "notification-style-1"
	UITypeNotificationStyle2 = "notification-style-2"
	UITypeNotificationStyle3 = "notification-style-3"
)

Variables

View Source
var (
	// devtype -> action -> event
	EventTypes map[string]map[string]message_bus.EventType

	PropertyNameLookupMaps = map[string]map[string]string{
		"disk": {
			fmt.Sprintf("%s:%s", ServiceName, "bus"):    "ID_BUS",
			fmt.Sprintf("%s:%s", ServiceName, "vendor"): "ID_VENDOR",
			fmt.Sprintf("%s:%s", ServiceName, "model"):  "ID_MODEL",
			fmt.Sprintf("%s:%s", ServiceName, "path"):   "DEVNAME",
			"tran":   "ID_BUS",
			"serial": "ID_SERIAL_SHORT",
		},
	}

	ActionPastTense = map[string]string{
		"add":    "added",
		"remove": "removed",
	}
)

Functions

func AdditionalProperties added in v0.4.0

func AdditionalProperties(v model.LSBLKModel) map[string]string

func EventAdapter added in v0.4.0

func EventAdapter(e netlink.UEvent) *message_bus.Event

func EventAdapterWithUIProperties added in v0.4.0

func EventAdapterWithUIProperties(event *message_bus.Event) *message_bus.Event

Types

This section is empty.

Jump to

Keyboard shortcuts

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