Documentation ¶
Index ¶
- Variables
- type File
- type Index
- func (st *Index) Beat(id string)
- func (st *Index) Check() error
- func (st *Index) Close() error
- func (st *Index) Get(status Status, n int) ([]*Video, error)
- func (st *Index) Init() error
- func (st *Index) Iter(status Status, f func(*Video) error) error
- func (st *Index) Pop(n int) ([]*Video, error)
- func (st *Index) Push(ids []string) (int, error)
- func (st *Index) Put(videos ...*Video) error
- func (st *Index) PutByID(force bool, ids ...string) error
- func (st *Index) Retry(id string, mode RetryMode) error
- type Meta
- type RetryMode
- type Status
- type Storage
- type Video
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrStop = errors.New("iteration stopped")
)
Functions ¶
This section is empty.
Types ¶
type Meta ¶
type Meta struct { Title string `json:"title,omitempty"` Description string `json:"description,omitempty"` ChannelID string `json:"channel_id,omitempty"` ChannelTitle string `json:"channel_title,omitempty"` Tags []string `json:"tags,omitempty"` PublishedAt time.Time `json:"published_at,omitempty"` }
type Video ¶
type Video struct { ID string `json:"id"` Status Status `json:"status"` Storages []Storage `json:"storages,omitempty"` Files []File `json:"file,omitempty"` Deadline *time.Time `json:"deadline,omitempty"` Attempt int `json:"attempt,omitempty"` RetryAfter *time.Time `json:"retry_after,omitempty"` Meta *Meta `json:"meta,omitempty"` Reason string `json:"reason,omitempty"` }
func (*Video) ClearSystem ¶
func (v *Video) ClearSystem()
Click to show internal directories.
Click to hide internal directories.