Documentation ¶
Index ¶
- Constants
- func LoadConfig(fname string) *config
- type DailyCount
- type Event
- type Recorder
- type RemoteSync
- type WatchStorage
- func (s *WatchStorage) BindRecorder(recorder *Recorder, syncDelay float64) error
- func (s *WatchStorage) CreateSchema() error
- func (s *WatchStorage) DailyCounts(days int, newDayHour int) ([]DailyCount, error)
- func (s *WatchStorage) KeyCountsAfterId(id int64) ([]rowTuple, error)
- func (s *WatchStorage) SchemaExists() bool
- func (s *WatchStorage) SerializeRecentKeyCounts(id int64) ([][]interface{}, error)
- func (s *WatchStorage) WriteKeys(keys int) error
Constants ¶
View Source
const DefaultConfigFname = "~/.selfwatch/config.json"
Variables ¶
This section is empty.
Functions ¶
func LoadConfig ¶
func LoadConfig(fname string) *config
Types ¶
type DailyCount ¶
type Recorder ¶
type Recorder struct { KeyPress func(Event) KeyRelease func(Event) ButtonPress func(Event) ButtonRelease func(Event) // contains filtered or unexported fields }
func NewRecorder ¶
func NewRecorder() *Recorder
func (*Recorder) GetInputFocus ¶
func (*Recorder) GetWindowAttributes ¶
func (*Recorder) ListProperties ¶
type RemoteSync ¶
type RemoteSync struct { Url string Storage *WatchStorage }
func (*RemoteSync) FlushEvery ¶
func (r *RemoteSync) FlushEvery(seconds float64) chan bool
func (*RemoteSync) FlushKeys ¶
func (s *RemoteSync) FlushKeys() error
func (*RemoteSync) GetLastRowId ¶
func (s *RemoteSync) GetLastRowId() (int64, error)
func (*RemoteSync) SendRows ¶
func (s *RemoteSync) SendRows(rows [][]interface{}) error
type WatchStorage ¶
type WatchStorage struct {
// contains filtered or unexported fields
}
func NewWatchStorage ¶
func NewWatchStorage(fname string) (*WatchStorage, error)
func (*WatchStorage) BindRecorder ¶
func (s *WatchStorage) BindRecorder(recorder *Recorder, syncDelay float64) error
func (*WatchStorage) CreateSchema ¶
func (s *WatchStorage) CreateSchema() error
func (*WatchStorage) DailyCounts ¶
func (s *WatchStorage) DailyCounts(days int, newDayHour int) ([]DailyCount, error)
func (*WatchStorage) KeyCountsAfterId ¶
func (s *WatchStorage) KeyCountsAfterId(id int64) ([]rowTuple, error)
func (*WatchStorage) SchemaExists ¶
func (s *WatchStorage) SchemaExists() bool
func (*WatchStorage) SerializeRecentKeyCounts ¶
func (s *WatchStorage) SerializeRecentKeyCounts(id int64) ([][]interface{}, error)
func (*WatchStorage) WriteKeys ¶
func (s *WatchStorage) WriteKeys(keys int) error
Click to show internal directories.
Click to hide internal directories.