Documentation ¶
Index ¶
- Constants
- func AutoSavePasswordFile(filepath string, accPwd map[string]AccountAndPassword, keys map[string]string, ...) error
- func GetKey(key string) (string, error)
- func GetOther(key string) (any, error)
- func InitCreatePasswordFile(filepath string)
- func LoadPasswordFile(filepath string) error
- type AccountAndPassword
Constants ¶
View Source
const ( AccMySQL = "mysql" AccRedis = "redis" AccMongoDB = "mongo_db" AccSQLite = "sqlite" AccOracle = "oracle" AccSQLServer = "sql_server" AccMariaDB = "maria_db" AccPostgreSQL = "postgre_sql" )
View Source
const ( KeyJwtSecretKey = "jwt_secret_key" //jwt密钥 KeyPwdSecretKey = "pwd_secret_key" //密码加密密钥 )
Variables ¶
This section is empty.
Functions ¶
func AutoSavePasswordFile ¶
func AutoSavePasswordFile(filepath string, accPwd map[string]AccountAndPassword, keys map[string]string, other map[string]any) error
AutoSavePasswordFile 自动保存password文件,如果原来的里面有的key,则不作任何改动;不存在的key则新增。
func InitCreatePasswordFile ¶ added in v0.0.49
func InitCreatePasswordFile(filepath string)
InitCreatePasswordFile 初始化创建一个password文件。
Types ¶
type AccountAndPassword ¶
type AccountAndPassword struct { IP string `json:"ip"` //IP Port uint `json:"port"` //端口 Account string `json:"account"` //账号 Password string `json:"password"` //密码 Other string `json:"other"` //其它 }
func GetAccountAndPassword ¶
func GetAccountAndPassword(name string) (AccountAndPassword, error)
GetAccountAndPassword 获取指定name的账号和密码信息
Click to show internal directories.
Click to hide internal directories.