service

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: May 22, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	IFACE  string = "org.freedesktop.login1.Session"
	SIGNAL string = IFACE + ".Unlock"
)

Variables

This section is empty.

Functions

func IdentityInProgress

func IdentityInProgress(state status.LoginState) bool

func VPNInProgress

func VPNInProgress(state vpnstatus.ConnectionState) bool

Types

type BaseError added in v0.0.5

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

func (*BaseError) Error added in v0.0.5

func (e *BaseError) Error() string

type ErrConnect added in v0.0.5

type ErrConnect struct{ BaseError }

type ErrDisconnect added in v0.0.5

type ErrDisconnect struct{ BaseError }

type ErrGetCertDate added in v0.0.5

type ErrGetCertDate struct{ BaseError }

type ErrGetIdentityStatus added in v0.0.5

type ErrGetIdentityStatus struct{ BaseError }

type ErrGetServers added in v0.0.5

type ErrGetServers struct{ BaseError }

type ErrGetVPNStatus added in v0.0.5

type ErrGetVPNStatus struct{ BaseError }

type ErrReLogin added in v0.0.5

type ErrReLogin struct{ BaseError }

type IdentityService

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

func NewIdentityService

func NewIdentityService() *IdentityService

func (*IdentityService) Close

func (i *IdentityService) Close()

closes resources

func (*IdentityService) GetStatus

func (i *IdentityService) GetStatus() (*status.Status, error)

retrieves identity status

func (*IdentityService) ReLogin

func (i *IdentityService) ReLogin() error

triggers identity agent login

func (*IdentityService) Subscribe

func (i *IdentityService) Subscribe() <-chan *status.Status

attaches to DBUS properties changed signal, maps to status and delivers them by returned channel

type VPNService

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

func NewVPNService

func NewVPNService() *VPNService

func (*VPNService) Close

func (v *VPNService) Close()

func (*VPNService) ConnectWithPasswordAndServer

func (v *VPNService) ConnectWithPasswordAndServer(password string, server string) error

triggers VPN connect

func (*VPNService) Disconnect

func (v *VPNService) Disconnect() error

func (*VPNService) GetCertExpireDate added in v0.0.3

func (v *VPNService) GetCertExpireDate() (int64, error)

func (*VPNService) GetServers

func (v *VPNService) GetServers() ([]string, error)

Returns servers to connect to

func (*VPNService) GetStatus

func (v *VPNService) GetStatus() (*vpnstatus.Status, error)

func (*VPNService) Subscribe

func (v *VPNService) Subscribe() <-chan *vpnstatus.Status

type Watcher

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

func NewWatcher

func NewWatcher() *Watcher

Creates new watcher

func (*Watcher) Close

func (w *Watcher) Close()

Cleanup dbus connection and channel

func (*Watcher) Listen

func (w *Watcher) Listen() <-chan struct{}

Listen to login events

type WrappedError added in v0.0.5

type WrappedError interface {
	Error() string
	// contains filtered or unexported methods
}

Jump to

Keyboard shortcuts

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