settings

package
v0.0.0-...-d2f2feb Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2019 License: MIT Imports: 6 Imported by: 6

Documentation

Overview

Package settings define the global application settings & flags

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BitAdminSettings

type BitAdminSettings struct {
	Username     string
	Password     string
	PasswordFile string
	URL          string
	TempDir      string
}

BitAdminSettings hold the global flags values

func NewSettings

func NewSettings() *BitAdminSettings

NewSettings create a new instance of BitAdminSettings

func (*BitAdminSettings) GetAPIClient

func (bs *BitAdminSettings) GetAPIClient() (*bitclient.BitClient, error)

GetAPIClient create a new instance of bitclient.BitClient initialized with the flag values

func (*BitAdminSettings) GetFileCache

func (bs *BitAdminSettings) GetFileCache() *helper.FileCache

GetFileCache create a new instance of helper.FileCache and load the data from disk

func (*BitAdminSettings) GetFlags

func (bs *BitAdminSettings) GetFlags() []cli.Flag

GetFlags provide the []cli.Flag needed by a cli.Command

func (*BitAdminSettings) Validate

func (bs *BitAdminSettings) Validate() error

Validate check for errors in global flag values

Jump to

Keyboard shortcuts

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