sqlite

package
v0.0.0-...-084c151 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2025 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SQLiteStorage

type SQLiteStorage struct {
	DB *sql.DB
}

func NewStorage

func NewStorage(ctx context.Context, path string) (*SQLiteStorage, error)

NewStorage creates new SQLite storage, creates tables if they don't exist

func (*SQLiteStorage) Cleanup

func (s *SQLiteStorage) Cleanup(ctx context.Context) error

Cleanup deletes all meetings and records from the database, used for testing

func (*SQLiteStorage) DeleteMeeting

func (s *SQLiteStorage) DeleteMeeting(ctx context.Context, UUID string) error

DeleteMeeting deletes a meeting with corresponding records from the database

func (*SQLiteStorage) GetMeeting

func (s *SQLiteStorage) GetMeeting(ctx context.Context, UUID string) (*model.Meeting, error)

GetMeeting returns a meeting from the database

func (*SQLiteStorage) GetMeetings

func (s *SQLiteStorage) GetMeetings(ctx context.Context) ([]model.Meeting, error)

ListMeetings returns a list of meetings from the database

func (*SQLiteStorage) GetQueuedRecord

func (s *SQLiteStorage) GetQueuedRecord(ctx context.Context) (*model.Record, error)

GetQueuedRecord returns a queued record from the database

func (*SQLiteStorage) GetRecords

func (s *SQLiteStorage) GetRecords(ctx context.Context, UUID string) ([]model.Record, error)

GetRecords returns records of specific meeting from the database

func (*SQLiteStorage) GetRecordsByStatus

func (s *SQLiteStorage) GetRecordsByStatus(ctx context.Context, status model.RecordStatus) ([]model.Record, error)

GetRecords returns records from the database

func (*SQLiteStorage) ListMeetings

func (s *SQLiteStorage) ListMeetings(ctx context.Context) ([]model.Meeting, error)

ListMeetings returns a list of meetings ready to be shown in the UI Meeting must have at least one recording of type 'MP4' with status =='downloaded'

func (*SQLiteStorage) ResetFailedRecords

func (s *SQLiteStorage) ResetFailedRecords(ctx context.Context) error

ResetFailedRecords resets all failed records to queued

func (*SQLiteStorage) SaveMeeting

func (s *SQLiteStorage) SaveMeeting(ctx context.Context, meeting model.Meeting) error

SaveMeeting saves a meeting to the database

func (*SQLiteStorage) Stats

func (s *SQLiteStorage) Stats(ctx context.Context) (map[model.RecordStatus]any, error)

Stats returns the number of records in each status

func (*SQLiteStorage) UpdateRecord

func (s *SQLiteStorage) UpdateRecord(ctx context.Context, Id string, status model.RecordStatus, path string) error

UpdateRecord updates a record in the database

Jump to

Keyboard shortcuts

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