cmd

package
v0.0.0-...-da60f25 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 23, 2024 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AppName = "crustle"
View Source
var Commit = "no-commit"
View Source
var Version = "no-version"

Functions

func DownloadFile

func DownloadFile(url, dst string) error

func DownloadTrack

func DownloadTrack(track *api.Track, dst string) (string, error)

func DownloadTrackCover

func DownloadTrackCover(track *api.Track, dst string) (string, error)

func Execute

func Execute()

func ReadDataFile

func ReadDataFile(workDir types.WorkDir) (types.DataFile, error)

func WriteDataFile

func WriteDataFile(workDir types.WorkDir, data types.DataFile) error

Types

type Config

type Config struct {
	ServerAddress string `mapstructure:"server_address"`
	DataDir       string `mapstructure:"data_dir"`
	DownloadDir   string `mapstructure:"download_dir"`
}

func (*Config) BootstrapDataDir

func (c *Config) BootstrapDataDir() (types.WorkDir, error)

func (*Config) WorkDir

func (c *Config) WorkDir() types.WorkDir

type Creds

type Creds struct {
	Username string
	Password string
}

func ReadCreds

func ReadCreds() (Creds, error)

type Filter

type Filter struct {
	Name   string `toml:"name"`
	Filter string `toml:"filter"`
	Sort   string `toml:"sort"`
}

func ReadFilters

func ReadFilters(file string) ([]Filter, error)

type FilterFile

type FilterFile struct {
	Filters []Filter `toml:"filters"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL