Documentation ¶
Index ¶
- Constants
- func DecryptPassword(encData string) string
- func EncryptPassword(oriData string) string
- func GetJSON(group, key string, value interface{}) error
- func GetPassword(group, key string) (string, error)
- func GetText(group, key string) (string, error)
- func GetYaml(group, key string, value interface{}) error
- func InitDB() error
- func Set(group, key, value string) error
- func SetPasswordAESKey(key string)
- func SetText(group, key, value string) error
- func SetYaml(group, key string, value interface{}) error
- func Updates(sets ...*SettingItem) error
- type SettingItem
- type ValueType
Constants ¶
View Source
const (
TableNameSettings = "core_settings"
)
Variables ¶
This section is empty.
Functions ¶
func SetPasswordAESKey ¶
func SetPasswordAESKey(key string)
Types ¶
type SettingItem ¶
type SettingItem struct { gorm.Model Group string `json:"group" gorm:"column:group;type:varchar(16);uniqueIndex:idx_setting,priority:2,unique"` Key string `json:"key" gorm:"column:key;type:varchar(64);uniqueIndex:idx_setting,priority:3,unique"` Name string `json:"name" gorm:"column:name;type:varchar(64)"` Describe string `json:"describe" gorm:"column:describe;type:varchar(128)"` ValueType ValueType `json:"value_type" gorm:"column:value_type;default:text;type:varchar(16)"` Value string `json:"value" gorm:"column:value;type:text"` Default string `json:"default" gorm:"column:default;type:text"` }
SettingItem 系统配置
func (*SettingItem) PasswordValue ¶
func (item *SettingItem) PasswordValue() string
PasswordValue 密码原文
Click to show internal directories.
Click to hide internal directories.