config

package
v0.0.0-...-4cafcdf Latest Latest
Warning

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

Go to latest
Published: May 30, 2023 License: MIT Imports: 5 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func OptConfig

func OptConfig(confName string) *viper.Viper

OptConfig 操作配置文件

func WriteEncryptPwd

func WriteEncryptPwd(param string, pwd string) error

WriteEncryptPwd 密码加密写入配置方法

func WriteEnvChange

func WriteEnvChange(param string, cli *cli.Context) error

Types

type ConfigStruct

type ConfigStruct struct {
	Tpwd string `yaml:"tpwd"`
	Ppwd string `yaml:"ppwd"`
}

ConfigStruct 配置文件内容

func (*ConfigStruct) LoadConfig

func (c *ConfigStruct) LoadConfig() error

LoadConfig 加载配置文件

func (*ConfigStruct) UpdateConfig

func (c *ConfigStruct) UpdateConfig(cli *cli.Context) error

UpdateConfig 更新配置文件

Jump to

Keyboard shortcuts

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