Documentation
¶
Index ¶
- type SQLiteStorage
- func (s *SQLiteStorage) Cleanup(ctx context.Context) error
- func (s *SQLiteStorage) DeleteMeeting(ctx context.Context, UUID string) error
- func (s *SQLiteStorage) GetMeeting(ctx context.Context, UUID string) (*model.Meeting, error)
- func (s *SQLiteStorage) GetMeetings(ctx context.Context) ([]model.Meeting, error)
- func (s *SQLiteStorage) GetQueuedRecord(ctx context.Context) (*model.Record, error)
- func (s *SQLiteStorage) GetRecords(ctx context.Context, UUID string) ([]model.Record, error)
- func (s *SQLiteStorage) GetRecordsByStatus(ctx context.Context, status model.RecordStatus) ([]model.Record, error)
- func (s *SQLiteStorage) ListMeetings(ctx context.Context) ([]model.Meeting, error)
- func (s *SQLiteStorage) ResetFailedRecords(ctx context.Context) error
- func (s *SQLiteStorage) SaveMeeting(ctx context.Context, meeting model.Meeting) error
- func (s *SQLiteStorage) Stats(ctx context.Context) (map[model.RecordStatus]any, error)
- func (s *SQLiteStorage) UpdateRecord(ctx context.Context, Id string, status model.RecordStatus, path string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SQLiteStorage ¶
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 ¶
GetMeeting returns a meeting from the database
func (*SQLiteStorage) GetMeetings ¶
ListMeetings returns a list of meetings from the database
func (*SQLiteStorage) GetQueuedRecord ¶
GetQueuedRecord returns a queued record from the database
func (*SQLiteStorage) GetRecords ¶
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 ¶
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 ¶
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