config

package
v0.1.32 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppConfig

type AppConfig struct {
	EncryptionCurrentVersion string
	MaxConcurrentConnections int
	ShaSumsURL               string
	UrlFile                  string
	NumParts                 int
	PartsDir                 string
	PrefixParts              string
	Proxy                    string
	KeepParts                bool
	DecryptManifest          bool
	ManifestFile             string
	ManifestTimestamp        int64
	DownloadOnly             bool
	AssembleOnly             bool
	OutputFile               string
	Verbose                  bool
	DecryptedContent         []byte
	ConfigName               string
	ConfigPath               string
	Log                      logger.LoggerInterface
	BindFlagsToViper         func(string, logger.LoggerInterface)
}

func NewAppConfig

func NewAppConfig(v *viper.Viper) *AppConfig

func (*AppConfig) InitConfig

func (appcfg *AppConfig) InitConfig(v *viper.Viper)

type DBConfig

type DBConfig struct {
	DB         *sql.DB
	DBDir      string
	DBFilename string
	DBPassword string
	ConfigName string
	ConfigPath string
	Log        logger.LoggerInterface
}

func NewDBConfig

func NewDBConfig(v *viper.Viper) *DBConfig

func (*DBConfig) GetConfigName

func (dbcfg *DBConfig) GetConfigName() string

func (*DBConfig) GetConfigPath

func (dbcfg *DBConfig) GetConfigPath() string

func (*DBConfig) GetDB

func (dbcfg *DBConfig) GetDB() *sql.DB

func (*DBConfig) GetDBDir

func (dbcfg *DBConfig) GetDBDir() string

func (*DBConfig) GetDBFilename

func (dbcfg *DBConfig) GetDBFilename() string

func (*DBConfig) GetDBPassword

func (dbcfg *DBConfig) GetDBPassword() string

func (*DBConfig) GetLog

func (dbcfg *DBConfig) GetLog() logger.LoggerInterface

func (*DBConfig) InitConfig

func (dbcfg *DBConfig) InitConfig(v *viper.Viper)

type Flags

type Flags struct {
	MaxConcurrentConnections string
	ShaSumsURL               string
	UrlFile                  string
	NumParts                 string
	PartsDir                 string
	PrefixParts              string
	Proxy                    string
	KeepParts                string
	DecryptManifest          string
	ManifestFile             string
	DownloadOnly             string
	AssembleOnly             string
	OutputFile               string
	EnablePprof              string
	Verbose                  string
}

func NewFlags

func NewFlags() *Flags

type PprofConfig

type PprofConfig struct {
	EnablePprof bool
	SecretToken string
	PprofPort   string
	CertPath    string
	KeyPath     string
	BaseURL     string
	ConfigName  string
	ConfigPath  string
	Log         logger.LoggerInterface
}

func NewPprofConfig

func NewPprofConfig(v *viper.Viper) *PprofConfig

func (*PprofConfig) InitConfig

func (ppcfg *PprofConfig) InitConfig(v *viper.Viper)

Jump to

Keyboard shortcuts

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