Documentation ¶
Overview ¶
Package login1 provides integration with the systemd logind API. See http://www.freedesktop.org/wiki/Software/systemd/logind/
Index ¶
- type Conn
- func (c *Conn) Close()
- func (c *Conn) Connected() bool
- func (c *Conn) GetActiveSession() (dbus.ObjectPath, error)
- func (c *Conn) GetSession(id string) (dbus.ObjectPath, error)
- func (c *Conn) GetSessionDisplay(sessionPath dbus.ObjectPath) (string, error)
- func (c *Conn) GetSessionPropertiesContext(ctx context.Context, sessionPath dbus.ObjectPath) (map[string]dbus.Variant, error)
- func (c *Conn) GetSessionPropertyContext(ctx context.Context, sessionPath dbus.ObjectPath, property string) (*dbus.Variant, error)
- func (c *Conn) GetSessionUser(sessionPath dbus.ObjectPath) (*User, error)
- func (c *Conn) GetUserPropertiesContext(ctx context.Context, userPath dbus.ObjectPath) (map[string]dbus.Variant, error)
- func (c *Conn) GetUserPropertyContext(ctx context.Context, userPath dbus.ObjectPath, property string) (*dbus.Variant, error)
- func (c *Conn) Inhibit(what, who, why, mode string) (*os.File, error)
- func (c *Conn) ListSessions() ([]Session, error)deprecated
- func (c *Conn) ListSessionsContext(ctx context.Context) ([]Session, error)
- func (c *Conn) ListUsers() ([]User, error)deprecated
- func (c *Conn) ListUsersContext(ctx context.Context) ([]User, error)
- func (c *Conn) LockSession(id string)
- func (c *Conn) LockSessions()
- func (c *Conn) PowerOff(askForAuth bool)
- func (c *Conn) Reboot(askForAuth bool)
- func (c *Conn) Subscribe(members ...string) chan *dbus.Signal
- func (c *Conn) TerminateSession(id string)
- func (c *Conn) TerminateUser(uid uint32)
- type Session
- type User
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 (*Conn) GetActiveSession ¶ added in v22.1.0
GetActiveSession may be used to get the session object path for the current active session
func (*Conn) GetSession ¶
GetSession may be used to get the session object path for the session with the specified ID.
func (*Conn) GetSessionDisplay ¶ added in v22.1.0
GetSessionDisplay may be used to get the display for specific session
func (*Conn) GetSessionPropertiesContext ¶ added in v22.4.0
func (c *Conn) GetSessionPropertiesContext(ctx context.Context, sessionPath dbus.ObjectPath) (map[string]dbus.Variant, error)
GetSessionPropertiesContext takes a session path and returns all of its dbus object properties.
func (*Conn) GetSessionPropertyContext ¶ added in v22.4.0
func (c *Conn) GetSessionPropertyContext(ctx context.Context, sessionPath dbus.ObjectPath, property string) (*dbus.Variant, error)
GetSessionPropertyContext takes a session path and a property name and returns the property value.
func (*Conn) GetSessionUser ¶ added in v22.1.0
GetSessionUser may be used to get the user of specific session
func (*Conn) GetUserPropertiesContext ¶ added in v22.4.0
func (c *Conn) GetUserPropertiesContext(ctx context.Context, userPath dbus.ObjectPath) (map[string]dbus.Variant, error)
GetUserPropertiesContext takes a user path and returns all of its dbus object properties.
func (*Conn) GetUserPropertyContext ¶ added in v22.4.0
func (c *Conn) GetUserPropertyContext(ctx context.Context, userPath dbus.ObjectPath, property string) (*dbus.Variant, error)
GetUserPropertyContext takes a user path and a property name and returns the property value.
func (*Conn) ListSessions
deprecated
func (*Conn) ListSessionsContext ¶ added in v22.4.0
ListSessionsContext returns an array with all current sessions.
func (*Conn) ListUsersContext ¶ added in v22.4.0
ListUsersContext returns an array with all currently logged-in users.
func (*Conn) LockSession ¶
LockSession asks the session with the specified ID to activate the screen lock.
func (*Conn) LockSessions ¶
func (c *Conn) LockSessions()
LockSessions asks all sessions to activate the screen locks. This may be used to lock any access to the machine in one action.
func (*Conn) TerminateSession ¶
TerminateSession forcibly terminate one specific session.
func (*Conn) TerminateUser ¶
TerminateUser forcibly terminates all processes of a user.