Documentation ¶
Index ¶
Constants ¶
View Source
const ConfigDefaults = `` /* 208-byte string literal not displayed */
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddCommand ¶
type AddCommand struct { Command Force bool `short:"f" long:"force" description:"Force adding existing videos (e.g. to retry failed downloads)"` Args struct { IDs []string `positional-arg-name:"ID"` } `positional-args:"1"` }
func (*AddCommand) Execute ¶
func (cmd *AddCommand) Execute([]string) error
type Browser ¶
type Command ¶
type Command struct { DB *sql.DB Index *index.Index Storages *storages.Storages Config *Config Wg *sync.WaitGroup Ctx context.Context CriticalCtx context.Context }
Command is a common part of all subcommands.
type Config ¶
type Config struct { Sources struct { History struct { Enable bool } Playlists map[string]string UpdateInterval time.Duration `yaml:"update_interval"` MaxDuration time.Duration `yaml:"max_duration"` } Dirs Dirs Storages []struct { Path string } Youtube struct { OAuth OAuth `yaml:"oauth"` } Python struct { Executable string `yaml:"executable"` YoutubeDL struct { Lite bool Version string UpdateInterval time.Duration `yaml:"update_interval"` Options map[string]interface{} } `yaml:"youtube-dl"` } Browser Browser }
type ImportCommand ¶
type ImportCommand struct { Args struct { File string `positional-arg-name:"FILE"` } `positional-args:"1" required:"1"` Command }
func (*ImportCommand) Execute ¶
func (cmd *ImportCommand) Execute([]string) error
type ListCommand ¶
type ListCommand struct { Status string `` /* 127-byte string literal not displayed */ JSON bool `long:"json" description:"JSON output"` NoTrunc bool `long:"no-trunc" description:"Don't truncate output"` Command }
func (*ListCommand) Execute ¶
func (cmd *ListCommand) Execute([]string) error
type OAuth ¶
type OAuth struct { AccessToken string `json:"access_token" yaml:"access_token"` TokenType string `json:"token_type,omitempty" yaml:"token_type,omitempty"` RefreshToken string `json:"refresh_token,omitempty" yaml:"refresh_token,omitempty"` Expiry time.Time `json:"expiry,omitempty" yaml:"expiry,omitempty"` }
func NewCredentials ¶
type Options ¶
type Options struct { ConfigPath string `short:"c" long:"config" description:"Config path" env:"YTBACKUP_CONFIG"` Debug bool `long:"debug" description:"Enable debug logging" env:"YTBACKUP_DEBUG"` }
Options is a group of common options for all subcommands.
type SetupCommand ¶
type SetupCommand struct {
Command
}
func (*SetupCommand) Execute ¶
func (cmd *SetupCommand) Execute([]string) error
type VersionCommand ¶
type VersionCommand struct {
Command
}
func (*VersionCommand) Execute ¶
func (cmd *VersionCommand) Execute([]string) error
Source Files ¶
Click to show internal directories.
Click to hide internal directories.