devices

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsConnected

func IsConnected(lastHandshake time.Time) bool

Types

type DeviceManager

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

func New

func (*DeviceManager) AddDevice

func (d *DeviceManager) AddDevice(identity *authsession.Identity, name string, publicKey string, presharedKey string) (*storage.Device, error)

func (*DeviceManager) DeleteDevice

func (d *DeviceManager) DeleteDevice(user string, name string) error

func (*DeviceManager) DeleteDevicesForUser added in v0.9.0

func (d *DeviceManager) DeleteDevicesForUser(user string) error

func (*DeviceManager) GetByPublicKey

func (d *DeviceManager) GetByPublicKey(publicKey string) (*storage.Device, error)

func (*DeviceManager) ListAllDevices

func (d *DeviceManager) ListAllDevices() ([]*storage.Device, error)

func (*DeviceManager) ListDevices

func (d *DeviceManager) ListDevices(user string) ([]*storage.Device, error)

func (*DeviceManager) ListUsers added in v0.9.0

func (d *DeviceManager) ListUsers() ([]*User, error)

func (*DeviceManager) Ping added in v0.9.0

func (d *DeviceManager) Ping() error

func (*DeviceManager) SaveDevice

func (d *DeviceManager) SaveDevice(device *storage.Device) error

func (*DeviceManager) StartSync

func (d *DeviceManager) StartSync(disableMetadataCollection, enableInactiveDeviceDeletion bool, inactiveDeviceGracePeriod time.Duration) error

type User added in v0.9.0

type User struct {
	Name        string
	DisplayName string
}

Jump to

Keyboard shortcuts

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