dbus

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: May 4, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const PermissionKey contextKey = "systemdPermission"

Variables

This section is empty.

Functions

func CheckPolkitByPID added in v0.3.0

func CheckPolkitByPID(pid int32, actionID string) (bool, error)

CheckPolkitByPID checks if the given PID is authorized for the given actionID.

Types

type DbusAuth added in v0.2.0

type DbusAuth struct {
	*dbus.Conn

	Timeout  uint32
	DbusName string
	DbusPath string
	// contains filtered or unexported fields
}

func (*DbusAuth) AuthRegister added in v0.2.0

func (a *DbusAuth) AuthRegister(sender dbus.Sender) *dbus.Error

Just register the sender for further call backs

func (*DbusAuth) Deauthorize added in v0.2.0

func (a *DbusAuth) Deauthorize() *dbus.Error

Deauthorize revokes the authorization

func (*DbusAuth) IsReadAuthorized added in v0.2.0

func (a *DbusAuth) IsReadAuthorized(ctx context.Context) (bool, error)

Check if read was authorized. Triggers also a call back via dbus if read was authorized at another time

func (*DbusAuth) IsWriteAuthorized added in v0.2.0

func (a *DbusAuth) IsWriteAuthorized(ctx context.Context) (bool, error)

Jump to

Keyboard shortcuts

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