common

package
v0.4.4 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Version           = "0.4.4"
	ServiceName       = "local-storage"
	DefaultMountPoint = "/DATA"
)
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",
		},
		"storage": make(map[string]string),
	}

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

Functions

func AdditionalProperties

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

func EventAdapter

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

func EventAdapterWithUIProperties

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