app

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: May 10, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExitCode

func ExitCode(err error) int

func WrapExit

func WrapExit(code int, err error) error

Types

type Context

type Context struct {
	Settings   Settings
	Config     *config.Config
	ConfigPath string
	Profile    config.Profile
	ProfileKey string
	Output     *output.Writer
	// contains filtered or unexported fields
}

func NewContext

func NewContext(settings Settings) (*Context, error)

func (*Context) ClearCache added in v0.9.0

func (c *Context) ClearCache() error

func (*Context) CommandContext added in v0.3.0

func (c *Context) CommandContext() context.Context

func (*Context) EnsureTimeout

func (c *Context) EnsureTimeout() time.Duration

func (*Context) ResolveCachePath added in v0.9.0

func (c *Context) ResolveCachePath() string

func (*Context) ResolveCookiePath

func (c *Context) ResolveCookiePath() string

func (*Context) SaveProfile

func (c *Context) SaveProfile(profile config.Profile) error

func (*Context) SetCommandContext added in v0.3.0

func (c *Context) SetCommandContext(ctx context.Context)

func (*Context) SetSpotify

func (c *Context) SetSpotify(client spotify.API)

func (*Context) Spotify

func (c *Context) Spotify() (spotify.API, error)

func (*Context) ValidateProfile

func (c *Context) ValidateProfile() error

type ExitError

type ExitError struct {
	Code int
	Err  error
}

func (ExitError) Error

func (e ExitError) Error() string

func (ExitError) Unwrap

func (e ExitError) Unwrap() error

type Settings

type Settings struct {
	ConfigPath string
	Profile    string
	Timeout    time.Duration
	Market     string
	Language   string
	Device     string
	Engine     string
	Format     output.Format
	NoColor    bool
	Quiet      bool
	Verbose    bool
	Debug      bool
	NoInput    bool
}

Jump to

Keyboard shortcuts

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