login1

package
v0.0.0-...-d1bcffe Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2016 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Integration with the systemd logind API. See http://www.freedesktop.org/wiki/Software/systemd/logind/

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Conn

type Conn struct {
	// contains filtered or unexported fields
}

Conn is a connection to systemds dbus endpoint.

func New

func New() (*Conn, error)

New() establishes a connection to the system bus and authenticates.

func (*Conn) Inhibit

func (c *Conn) Inhibit(what, who, why, mode string) (*os.File, error)

Inhibit takes inhibition lock in logind.

func (*Conn) PowerOff

func (c *Conn) PowerOff(askForAuth bool)

PowerOff asks logind for a power off optionally asking for auth.

func (*Conn) Reboot

func (c *Conn) Reboot(askForAuth bool)

Reboot asks logind for a reboot optionally asking for auth.

func (*Conn) Subscribe

func (c *Conn) Subscribe(members ...string) chan *dbus.Signal

Subscribe to signals on the logind dbus

Jump to

Keyboard shortcuts

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