config

package
v0.0.0-...-a6e6698 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Exist Is config file exist
	Exist bool
	// Models configs
	Models []ModelConfig
	// IsTest env
	IsTest bool
	// HomeDir of user
	HomeDir  string
	TempPath string
)

Functions

This section is empty.

Types

type ModelConfig

type ModelConfig struct {
	Name          string
	DumpPath      string
	CompressWith  SubConfig
	EncryptWith   SubConfig
	StoreWith     SubConfig
	Archive       *viper.Viper
	Databases     []SubConfig
	Storages      []SubConfig
	Viper         *viper.Viper
	Notifications SubConfig
}

ModelConfig for special case

func GetModelByName

func GetModelByName(name string) (model *ModelConfig)

GetModelByName get model by name

func (*ModelConfig) GetDatabaseByName

func (model *ModelConfig) GetDatabaseByName(name string) (subConfig *SubConfig)

GetDatabaseByName get database config by name

type SubConfig

type SubConfig struct {
	Name  string
	Type  string
	Viper *viper.Viper
}

SubConfig sub config info

Jump to

Keyboard shortcuts

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