Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AutoMigrate ¶
Types ¶
type Backup ¶
type Backup struct {
// contains filtered or unexported fields
}
func NewBackup ¶
func NewBackup(downloader *Downloader, client *coubs.Client, db *gorm.DB, state *SharedState) *Backup
type Downloader ¶
type Downloader struct {
// contains filtered or unexported fields
}
func NewDownloader ¶
func (*Downloader) DownloadCoub ¶
func (d *Downloader) DownloadCoub(rawCoub []byte) error
type ProfileCoub ¶
type SharedState ¶
type SharedState struct { // contains filtered or unexported fields }
func NewSharedState ¶
func NewSharedState() *SharedState
func (*SharedState) DownloadingCoub ¶
func (s *SharedState) DownloadingCoub(profile string, page, index int, rawCoub json.RawMessage)
func (*SharedState) DownloadingProfilePage ¶
func (s *SharedState) DownloadingProfilePage(profile string, page int)
func (*SharedState) Get ¶
func (s *SharedState) Get() State
func (*SharedState) GotProfilePage ¶
func (s *SharedState) GotProfilePage(profile string, page int, response *coubs.PageResponse)
type State ¶
type State struct { Profile string Page int PerPage int TotalPages int IndexInPage int Favorite bool `json:"favorite"` Recoub bool `json:"recoub"` Like bool `json:"like"` Dislike bool `json:"dislike"` ID int `json:"id"` Type string `json:"type"` Permalink string `json:"permalink"` Title string `json:"title"` ViewsCount int `json:"views_count"` PublishedAt time.Time `json:"published_at"` FileVersions coubs.FileVersions `json:"file_versions"` AudioVersions coubs.AudioVersions `json:"audio_versions,omitempty"` Channel string `json:"channel"` LikesCount int `json:"likes_count"` DislikesCount int `json:"dislikes_count"` }
Click to show internal directories.
Click to hide internal directories.