Documentation
¶
Index ¶
- func AutoMigrateDatabase()
- func NewUUID() string
- func SetupEnv()
- func ToBase64(_content []byte) string
- func ToUUID(_content string) string
- type Account
- type AccountDAO
- func (AccountDAO) Find(_uuid string) (Account, error)
- func (AccountDAO) Insert(_account Account) error
- func (AccountDAO) StrengthenPassword(_password string, _salt string) string
- func (AccountDAO) UpdatePassword(_uuid string, _password string) error
- func (AccountDAO) UpdateProfile(_uuid string, _profile string) error
- func (AccountDAO) WhereUsername(_username string) (Account, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AutoMigrateDatabase ¶
func AutoMigrateDatabase()
Types ¶
type Account ¶
type Account struct {
Embedded gorm.Model `gorm:"embedded"`
UUID string `gorm:"column:uuid;type:char(32);not null;unique"`
Username string `gorm:"column:username;type:varchar(32);not null;unique"`
Password string `gorm:"column:password;type:char(32);not null"`
Profile string `gorm:"column:profile;type:text"`
}
type AccountDAO ¶
type AccountDAO struct {
}
func NewAccountDAO ¶
func NewAccountDAO() *AccountDAO
func (AccountDAO) Insert ¶
func (AccountDAO) Insert(_account Account) error
func (AccountDAO) StrengthenPassword ¶
func (AccountDAO) StrengthenPassword(_password string, _salt string) string
func (AccountDAO) UpdatePassword ¶
func (AccountDAO) UpdatePassword(_uuid string, _password string) error
func (AccountDAO) UpdateProfile ¶
func (AccountDAO) UpdateProfile(_uuid string, _profile string) error
func (AccountDAO) WhereUsername ¶
func (AccountDAO) WhereUsername(_username string) (Account, error)
Click to show internal directories.
Click to hide internal directories.