Documentation
¶
Index ¶
- Constants
- func IsDBusNameTaken(dbusName string) (bool, error)
- type DbusAuth
- func (a *DbusAuth) AuthRead(sender dbus.Sender) *dbus.Error
- func (a *DbusAuth) AuthRegister(sender dbus.Sender) *dbus.Error
- func (a *DbusAuth) AuthWrite(sender dbus.Sender) *dbus.Error
- func (a *DbusAuth) Deauthorize() *dbus.Error
- func (a *DbusAuth) IsLocal() bool
- func (a *DbusAuth) IsReadAuthorized(ctx context.Context) (bool, error)
- func (a *DbusAuth) IsWriteAuthorized(ctx context.Context) (bool, error)
Constants ¶
View Source
const PermissionKey contextKey = "systemdPermission"
Variables ¶
This section is empty.
Functions ¶
func IsDBusNameTaken ¶
IsDBusNameTaken checks if the dbus name is already taken.
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 SetupDBus ¶
setup the dbus authorization call back. Creates AuthWrite and AuthRead dbus methods so that authorization can be done by another process calliing this methods.
func (*DbusAuth) AuthRegister ¶ added in v0.2.0
Just register the sender for further call backs
func (*DbusAuth) Deauthorize ¶ added in v0.2.0
Deauthorize revokes the authorization
func (*DbusAuth) IsReadAuthorized ¶ added in v0.2.0
Check if read was authorized. Triggers also a call back via dbus if read was authorized at another time
Click to show internal directories.
Click to hide internal directories.