stats

package
v1.16.1 Latest Latest
Warning

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

Go to latest
Published: May 5, 2021 License: MPL-2.0 Imports: 5 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DeviceStatistics

type DeviceStatistics struct {
	LastSeen                time.Time `json:"lastSeen"`
	LastConnectionDurationS float64   `json:"lastConnectionDurationS"`
}

type DeviceStatisticsReference

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

func NewDeviceStatisticsReference

func NewDeviceStatisticsReference(dba backend.Backend, device protocol.DeviceID) *DeviceStatisticsReference

func (*DeviceStatisticsReference) GetLastConnectionDuration added in v1.13.0

func (s *DeviceStatisticsReference) GetLastConnectionDuration() (time.Duration, error)

func (*DeviceStatisticsReference) GetLastSeen

func (s *DeviceStatisticsReference) GetLastSeen() (time.Time, error)

func (*DeviceStatisticsReference) GetStatistics

func (s *DeviceStatisticsReference) GetStatistics() (DeviceStatistics, error)

func (*DeviceStatisticsReference) LastConnectionDuration added in v1.13.0

func (s *DeviceStatisticsReference) LastConnectionDuration(d time.Duration) error

func (*DeviceStatisticsReference) WasSeen

func (s *DeviceStatisticsReference) WasSeen() error

type FolderStatistics

type FolderStatistics struct {
	LastFile LastFile  `json:"lastFile"`
	LastScan time.Time `json:"lastScan"`
}

type FolderStatisticsReference

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

func NewFolderStatisticsReference

func NewFolderStatisticsReference(ldb *db.Lowlevel, folder string) *FolderStatisticsReference

func (*FolderStatisticsReference) GetLastFile

func (s *FolderStatisticsReference) GetLastFile() (LastFile, error)

func (*FolderStatisticsReference) GetLastScanTime added in v0.13.5

func (s *FolderStatisticsReference) GetLastScanTime() (time.Time, error)

func (*FolderStatisticsReference) GetStatistics

func (s *FolderStatisticsReference) GetStatistics() (FolderStatistics, error)

func (*FolderStatisticsReference) ReceivedFile

func (s *FolderStatisticsReference) ReceivedFile(file string, deleted bool) error

func (*FolderStatisticsReference) ScanCompleted added in v0.13.5

func (s *FolderStatisticsReference) ScanCompleted() error

type LastFile

type LastFile struct {
	At       time.Time `json:"at"`
	Filename string    `json:"filename"`
	Deleted  bool      `json:"deleted"`
}

Jump to

Keyboard shortcuts

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