Documentation
¶
Index ¶
- func GetHomeDir() string
- type Activity
- type Alert_Settings
- type App_Count
- type DB
- func (d *DB) AddActivity(activity Activity)
- func (d *DB) AllTimeMostUsedApp() []App_Count
- func (d *DB) Connection()
- func (d *DB) CountAppUsageWithRange(startTime int64, endTime int64) []App_Count
- func (d *DB) CreateTables()
- func (d *DB) GetAlertSettings() (alert_settings Alert_Settings)
- func (d *DB) HighestUsedApp(startTime int64, endTime int64) App_Count
- func (d *DB) InitAlert()
- func (d *DB) QueryAppUsageCount(startTime int64, endTime int64) *sql.Rows
- func (d *DB) ReadAllRows() []Activity
- func (d *DB) UpdateAlertInterval(interval int)
- func (d *DB) UpdateAlertOn(turn_on bool)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetHomeDir ¶
func GetHomeDir() string
Types ¶
type Activity ¶
type Activity struct { Start_Time int64 // timestamp of when session started Log_Time int64 // timestamp of when activity was recorded App_Or_Site string // app_title or website domain Url string // website_url App_Name string // app_title Title string // website_title or windowTitle }
every second, time series log of current application being used needed for alerts and gathering data
func ScanAllRows ¶
Scans the data returned from query to get all rows
type Alert_Settings ¶
type App_Count ¶
How often app was used
func ScanAppCountQuery ¶
Scans the data returned from query and places into struct
type DB ¶
type DB struct {
// contains filtered or unexported fields
}
func (*DB) AddActivity ¶
Logs computer usage into Activity Table of database
func (*DB) AllTimeMostUsedApp ¶
func (*DB) Connection ¶
func (d *DB) Connection()
func (*DB) CountAppUsageWithRange ¶
Finds the number of occurances of an app/site within a time period
func (*DB) CreateTables ¶
func (d *DB) CreateTables()
func (*DB) GetAlertSettings ¶
func (d *DB) GetAlertSettings() (alert_settings Alert_Settings)
func (*DB) QueryAppUsageCount ¶
Executes the query to get the count of number of app/site within time period
func (*DB) ReadAllRows ¶
Executes a query to get back all rows within Activity Table
func (*DB) UpdateAlertInterval ¶
func (*DB) UpdateAlertOn ¶
Click to show internal directories.
Click to hide internal directories.