Documentation
¶
Index ¶
- type DownloadRecord
- type Storage
- func (s *Storage) AddDownloadRecord(dr *adding.DownloadRecord) (int64, error)
- func (s *Storage) AllDownloadRecords() (*[]listing.DownloadRecord, error)
- func (s *Storage) GetDownloadRecord(id int64) (*listing.DownloadRecord, error)
- func (s *Storage) UpdateDownloadRecord(dr *updating.DownloadRecord) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DownloadRecord ¶
type DownloadRecord struct {
ID int64 `json:"id"`
URL string `json:"url"`
Subfolder string `json:"subfolder"`
Output sql.NullString `json:"output"`
Errors sql.NullString `json:"errors"`
Finished string `json:"finished"`
Filename sql.NullString `json:"filename"`
Title sql.NullString `json:"title"`
}
DownloadRecord defines the stored download metadata
type Storage ¶
type Storage struct {
// contains filtered or unexported fields
}
Storage is the interface that defines interacting with Download Records
func NewStorage ¶
NewStorage returns a new Sql DB storage
func (*Storage) AddDownloadRecord ¶
func (s *Storage) AddDownloadRecord(dr *adding.DownloadRecord) (int64, error)
AddDownloadRecord Puts the records
func (*Storage) AllDownloadRecords ¶
func (s *Storage) AllDownloadRecords() (*[]listing.DownloadRecord, error)
AllDownloadRecords gets records.
func (*Storage) GetDownloadRecord ¶
func (s *Storage) GetDownloadRecord(id int64) (*listing.DownloadRecord, error)
GetDownloadRecord gets records.
func (*Storage) UpdateDownloadRecord ¶
func (s *Storage) UpdateDownloadRecord(dr *updating.DownloadRecord) error
UpdateDownloadRecord Puts the records
Click to show internal directories.
Click to hide internal directories.