selfspy

package
v0.0.0-...-0dfd57a Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package selfspy provides access to the selfspy database.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Activity

type Activity struct {
	Type    string
	Process string
	Title   string
	Weight  float32
}

func Categorize

func Categorize(defs []ActivityDef, e Event) Activity

func Summarize

func Summarize(defs []ActivityDef, es []Event) []Activity

type ActivityDef

type ActivityDef struct {
	Process string
	Window  string
	Type    string
	Weight  float32
}

func (ActivityDef) Matches

func (d ActivityDef) Matches(e Event) bool

type ByWeight

type ByWeight []Activity

func (ByWeight) Len

func (a ByWeight) Len() int

func (ByWeight) Less

func (a ByWeight) Less(i, j int) bool

func (ByWeight) Swap

func (a ByWeight) Swap(i, j int)

type Click

type Click struct {
	Event
	Button  int
	Press   bool
	X       int
	Y       int
	Nrmoves int
}

func (*Click) AfterFind

func (c *Click) AfterFind(tx *gorm.DB) error

func (Click) TableName

func (Click) TableName() string

type Event

type Event struct {
	Id        int64
	CreatedAt time.Time
	WindowId  int64

	Window Window
}

func KeysToEvents

func KeysToEvents(ks []Keys) []Event

func ToEvents

func ToEvents(keys []Keys, clicks []Click) []Event

type Keys

type Keys struct {
	Event
	//Text       []byte
	Started time.Time
	Nrkeys  int
}

func (*Keys) AfterFind

func (k *Keys) AfterFind(tx *gorm.DB) error

func (Keys) TableName

func (Keys) TableName() string

type Process

type Process struct {
	Id        int64
	CreatedAt time.Time
	Name      string
}

func (Process) TableName

func (Process) TableName() string

type Window

type Window struct {
	Id        int64
	CreatedAt time.Time
	Title     string
	ProcessId int64

	Process Process
}

func (*Window) AfterFind

func (w *Window) AfterFind(tx *gorm.DB) error

func (Window) TableName

func (Window) TableName() string

Jump to

Keyboard shortcuts

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