Documentation
¶
Index ¶
- type DbParams
- type DbRow
- type InsertTuple
- type LogsDatabase
- func (l *LogsDatabase) BatchInsert(tuples []InsertTuple) error
- func (l *LogsDatabase) Close()
- func (l *LogsDatabase) GetAllLogs() (*SelectResult, error)
- func (l *LogsDatabase) Insert(tuple InsertTuple) error
- func (l *LogsDatabase) MigrateUp() error
- func (l *LogsDatabase) Search(term string) (*SelectResult, error)
- func (l *LogsDatabase) Select(limit int, clause string) (*SelectResult, error)
- type SelectResult
- type SelectedRow
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type InsertTuple ¶
type InsertTuple struct { ParsedLog *v0.LineEnvelope Source string }
type LogsDatabase ¶
type LogsDatabase struct { Connection *sql.DB DatabaseFile string // contains filtered or unexported fields }
func New ¶
func New(params DbParams) (*LogsDatabase, error)
func (*LogsDatabase) BatchInsert ¶
func (l *LogsDatabase) BatchInsert(tuples []InsertTuple) error
func (*LogsDatabase) Close ¶
func (l *LogsDatabase) Close()
func (*LogsDatabase) GetAllLogs ¶
func (l *LogsDatabase) GetAllLogs() (*SelectResult, error)
func (*LogsDatabase) Insert ¶
func (l *LogsDatabase) Insert(tuple InsertTuple) error
func (*LogsDatabase) MigrateUp ¶
func (l *LogsDatabase) MigrateUp() error
func (*LogsDatabase) Search ¶
func (l *LogsDatabase) Search(term string) (*SelectResult, error)
func (*LogsDatabase) Select ¶
func (l *LogsDatabase) Select(limit int, clause string) (*SelectResult, error)
type SelectResult ¶
type SelectResult struct { Rows []SelectedRow StartRowId int EndRowId int }
func (*SelectResult) ToLines ¶
func (s *SelectResult) ToLines() []common.Envelope
ToLines converts the selection result into a set of parsed common.Envelope objects.
Click to show internal directories.
Click to hide internal directories.