retained

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2026 License: MIT, MIT Imports: 9 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package retained is lys-polkit's session-bus contract for the admin authorizations polkitd retains after an auth_admin_keep action: the TemporaryAuthorizations property of dev.stubbe.lys.Polkit1, its PropertiesChanged, and RevokeAll and Revoke.

Index

Constants

View Source
const (
	ServiceName = "dev.stubbe.lys.Polkit1"
	ServicePath = dbus.ObjectPath("/dev/stubbe/lys/Polkit")
	Interface   = "dev.stubbe.lys.Polkit1"
	Property    = "TemporaryAuthorizations"
)

Variables

This section is empty.

Functions

func ChangedMatch

func ChangedMatch() []dbus.MatchOption

func FromUnix

func FromUnix(seconds uint64) (time.Time, error)

func Sort

func Sort(list []Authorization)

Types

type Authorization

type Authorization struct {
	ID       string
	ActionID string
	Obtained time.Time
	Expires  time.Time
}

func Changed

func Changed(sig *dbus.Signal) ([]Authorization, bool, error)

type Client

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

func NewClient

func NewClient(conn *dbus.Conn) *Client

func (*Client) Authorizations

func (c *Client) Authorizations(ctx context.Context) ([]Authorization, error)

func (*Client) Revoke

func (c *Client) Revoke(ctx context.Context, id string) error

func (*Client) RevokeAll

func (c *Client) RevokeAll(ctx context.Context) error

type Revoker

type Revoker interface {
	RevokeAll(ctx context.Context) error
	Revoke(ctx context.Context, id string) error
}

type Server

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

func Serve

func Serve(conn *dbus.Conn, revoker Revoker) (*Server, func(), error)

func (*Server) Publish

func (s *Server) Publish(list []Authorization) error

Jump to

Keyboard shortcuts

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