Documentation
¶
Index ¶
- Constants
- Variables
- type DB
- func (db *DB) FetchAllSessions() ([]*Session, error)
- func (db *DB) FetchLatestSession() (*Session, error)
- func (db *DB) FetchPreviousSession() (*Session, error)
- func (db *DB) FetchRecords(from, to time.Time) ([]*OxiRecord, error)
- func (db *DB) FetchRecordsBySessionID(sessionID int64) ([]*OxiRecord, error)
- func (db *DB) FetchSessionByStartTime(start time.Time) (*Session, error)
- func (db *DB) Initialize() error
- func (db *DB) SaveRecords(records []*OxiRecord) error
- func (db *DB) SaveSession(session *Session) error
- type Datastore
- type OxiRecord
- type Session
Constants ¶
View Source
const ( SessionSchema = `` /* 135-byte string literal not displayed */ OxiRecordSchema = `` /* 136-byte string literal not displayed */ )
Variables ¶
View Source
var ErrNotFound = errors.New("Record not found in database")
Functions ¶
This section is empty.
Types ¶
type DB ¶
func (*DB) FetchAllSessions ¶
func (*DB) FetchLatestSession ¶
func (*DB) FetchPreviousSession ¶
func (*DB) FetchRecordsBySessionID ¶
func (*DB) FetchSessionByStartTime ¶
func (*DB) Initialize ¶
func (*DB) SaveRecords ¶
func (*DB) SaveSession ¶
type Datastore ¶
type Datastore interface { Initialize() error SaveRecords(records []*OxiRecord) error FetchRecords(from, to time.Time) ([]*OxiRecord, error) FetchRecordsBySessionID(id int64) ([]*OxiRecord, error) SaveSession(session *Session) error FetchLatestSession() (*Session, error) FetchPreviousSession() (*Session, error) FetchSessionByStartTime(start time.Time) (*Session, error) FetchAllSessions() ([]*Session, error) }
Click to show internal directories.
Click to hide internal directories.