Documentation ¶
Index ¶
- func CheckUser(dataFile, username, password string) (bool, bool, error)
- func ImportRecord(dataFile string, records []*AccountRecord) error
- func ModifyRecord(dbFile, masterUserName, masterPassword string, newData *DecodedRecord) error
- func ModifyUser(dataFile, username, password string) error
- func RemoveRecord(dbFile, masterUserName, recordName string) error
- type AccountRecord
- type DecodedRecord
- type DecodedUser
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ImportRecord ¶
func ImportRecord(dataFile string, records []*AccountRecord) error
func ModifyRecord ¶
func ModifyRecord(dbFile, masterUserName, masterPassword string, newData *DecodedRecord) error
func ModifyUser ¶
func RemoveRecord ¶
Types ¶
type AccountRecord ¶
type AccountRecord struct { ID int64 `gorm:"PRIMARY_KEY;AUTO_INCREMENT"` UserName string `gorm:"size:255;index;not null"` Name string `gorm:"size:255;index;not null;unique"` Description string `gorm:"size:255"` LoginName string `gorm:"size:255;index"` Salt string `gorm:"size:255;not null;"` LoginPasswordEn string `gorm:"size:255;index"` ExtraMessage string `gorm:"size:255;index"` IsRemoved bool `gorm:"index"` CreateTime time.Time `gorm:"type:datetime"` UpdateTime time.Time `gorm:"type:datetime"` RemoveTime time.Time `gorm:"type:datetime"` }
func DumpRecord ¶
func DumpRecord(dataFile string, masterUserName string) ([]*AccountRecord, error)
func (AccountRecord) TableName ¶
func (AccountRecord) TableName() string
type DecodedRecord ¶
type DecodedRecord struct { Name string Description string LoginName string LoginPassword string ExtraMessage string CreateTime time.Time UpdateTime time.Time }
func QueryRecord ¶
func QueryRecord(dataFile string, masterUserName, masterPassword string, recordNameKeyword string) ([]*DecodedRecord, error)
QueryRecord 查询record,仅仅用于展示
type DecodedUser ¶
type User ¶
type User struct { ID int64 `gorm:"PRIMARY_KEY;AUTO_INCREMENT"` Name string `gorm:"size:255;index;not null;unique"` Description string `gorm:"size:255"` Salt string `gorm:"size:255;not null;"` PassToken string `gorm:"size:255"` CreateTime time.Time `gorm:"type:datetime"` UpdateTime time.Time `gorm:"type:datetime"` }
Click to show internal directories.
Click to hide internal directories.