model

package
v0.0.0-...-cc50a0b Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2019 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AutoMigrateDatabase

func AutoMigrateDatabase()

func NewUUID

func NewUUID() string

func SetupEnv

func SetupEnv()

func ToBase64

func ToBase64(_content []byte) string

func ToUUID

func ToUUID(_content string) string

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"`
}

func (Account) TableName

func (Account) TableName() string

type AccountDAO

type AccountDAO struct {
}

func NewAccountDAO

func NewAccountDAO() *AccountDAO

func (AccountDAO) Find

func (AccountDAO) Find(_uuid string) (Account, error)

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)

Jump to

Keyboard shortcuts

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