dnclient

package
v0.0.1-alpha1 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2020 License: MIT Imports: 30 Imported by: 0

Documentation

Overview

Package dnclient generated by go-bindata.// sources: init/windows/application.ico

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoTMDB    = fmt.Errorf("TMDB ID must not be empty")
	ErrNoGRID    = fmt.Errorf("GRID ID must not be empty")
	ErrNoTVDB    = fmt.Errorf("TVDB ID must not be empty")
	ErrNoMBID    = fmt.Errorf("MBID ID must not be empty")
	ErrNoRadarr  = fmt.Errorf("configured radarr ID not found")
	ErrNoSonarr  = fmt.Errorf("configured sonarr ID not found")
	ErrNoLidarr  = fmt.Errorf("configured lidarr ID not found")
	ErrNoReadarr = fmt.Errorf("configured readarr ID not found")
	ErrExists    = fmt.Errorf("the requested item already exists")
)

Errors sent to client web requests.

View Source
var (
	ErrNilAPIKey = fmt.Errorf("API key cannot be empty")
)

Errors returned by this package.

Functions

func Asset

func Asset(name string) ([]byte, error)

Asset loads and returns the asset for the given name. It returns an error if the asset could not be found or could not be loaded.

func AssetDir

func AssetDir(name string) ([]string, error)

AssetDir returns the file names below a certain directory embedded in the file by go-bindata. For example if you run go-bindata on data/... and data contains the following hierarchy:

data/
  foo.txt
  img/
    a.png
    b.png

then AssetDir("data") would return []string{"foo.txt", "img"} AssetDir("data/img") would return []string{"a.png", "b.png"} AssetDir("foo.txt") and AssetDir("nonexistent") would return an error AssetDir("") will return []string{"data"}.

func AssetInfo

func AssetInfo(name string) (os.FileInfo, error)

AssetInfo loads and returns the asset info for the given name. It returns an error if the asset could not be found or could not be loaded.

func AssetNames

func AssetNames() []string

AssetNames returns the names of the assets.

func MustAsset

func MustAsset(name string) []byte

MustAsset is like Asset but panics when Asset would return an error. It simplifies safe initialization of global variables.

func RestoreAsset

func RestoreAsset(dir, name string) error

RestoreAsset restores an asset under the given directory

func RestoreAssets

func RestoreAssets(dir, name string) error

RestoreAssets restores an asset under the given directory recursively

func Start

func Start() error

Start runs the app.

Types

type Client

type Client struct {
	Flags *Flags
	*Config
	*Logger
	// contains filtered or unexported fields
}

Client stores all the running data.

func (*Client) RunWebServer

func (c *Client) RunWebServer()

RunWebServer starts the web server.

type Config

type Config struct {
	APIKey    string           `json:"api_key" toml:"api_key" xml:"api_key" yaml:"api_key"`
	BindAddr  string           `json:"bind_addr" toml:"bind_addr" xml:"bind_addr" yaml:"bind_addr"`
	Debug     bool             `json:"debug" toml:"debug" xml:"debug" yaml:"debug"`
	Quiet     bool             `json:"quiet" toml:"quiet" xml:"quiet" yaml:"quiet"`
	LogFile   string           `json:"log_file" toml:"log_file" xml:"log_file" yaml:"log_file"`
	LogFiles  int              `json:"log_files" toml:"log_files" xml:"log_files" yaml:"log_files"`
	LogFileMb int              `json:"log_file_mb" toml:"log_file_mb" xml:"log_file_mb" yaml:"log_file_mb"`
	Timeout   cnfg.Duration    `json:"timeout" toml:"timeout" xml:"timeout" yaml:"timeout"`
	Sonarr    []*SonarrConfig  `json:"sonarr,omitempty" toml:"sonarr" xml:"sonarr" yaml:"sonarr,omitempty"`
	Radarr    []*RadarrConfig  `json:"radarr,omitempty" toml:"radarr" xml:"radarr" yaml:"radarr,omitempty"`
	Lidarr    []*LidarrConfig  `json:"lidarr,omitempty" toml:"lidarr" xml:"lidarr" yaml:"lidarr,omitempty"`
	Readarr   []*ReadarrConfig `json:"readarr,omitempty" toml:"readarr" xml:"readarr" yaml:"readarr,omitempty"`
}

Config represents the data in our config file.

type Flags

type Flags struct {
	*flag.FlagSet

	ConfigFile string
	EnvPrefix  string
	// contains filtered or unexported fields
}

Flags are our CLI input flags.

type LidarrConfig

type LidarrConfig struct {
	*starr.Config
	*lidarr.Lidarr
	sync.RWMutex `json:"-" toml:"-" xml:"-" yaml:"-"`
}

LidarrConfig represents the input data for a Lidarr server.

type Logger

type Logger struct {
	Logger *log.Logger
	// contains filtered or unexported fields
}

Logger provides a struct we can pass into other packages.

func (*Logger) Debugf

func (l *Logger) Debugf(msg string, v ...interface{})

Debugf writes Debug log lines... to stdout and/or a file.

func (*Logger) Print

func (l *Logger) Print(v ...interface{})

Print writes log lines... to stdout and/or a file.

func (*Logger) Printf

func (l *Logger) Printf(msg string, v ...interface{})

Printf writes log lines... to stdout and/or a file.

type RadarrConfig

type RadarrConfig struct {
	*starr.Config
	*radarr.Radarr
	sync.RWMutex `json:"-" toml:"-" xml:"-" yaml:"-"`
}

RadarrConfig represents the input data for a Radarr server.

type ReadarrConfig

type ReadarrConfig struct {
	*starr.Config
	*readarr.Readarr
	sync.RWMutex `json:"-" toml:"-" xml:"-" yaml:"-"`
}

ReadarrConfig represents the input data for a Readarr server.

type Response

type Response struct {
	Status  string      `json:"status"`
	Message interface{} `json:"message"`
}

Response formats all content-containing replies to client web requests.

type SonarrConfig

type SonarrConfig struct {
	*starr.Config
	*sonarr.Sonarr
	sync.RWMutex `json:"-" toml:"-" xml:"-" yaml:"-"`
}

SonarrConfig represents the input data for a Sonarr server.

Jump to

Keyboard shortcuts

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