dao

package
v0.0.0-...-99cece9 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitMysql

func InitMysql(host, port, user, password, dbName string) (err error)

Types

type UserDAO

type UserDAO interface {
	SelectByEmail(email string) (*UserEntity, error)
	Save(user *UserEntity) error
}

type UserDAOImpl

type UserDAOImpl struct {
}

func (*UserDAOImpl) Save

func (userDAO *UserDAOImpl) Save(user *UserEntity) error

func (*UserDAOImpl) SelectByEmail

func (userDAO *UserDAOImpl) SelectByEmail(email string) (*UserEntity, error)

type UserEntity

type UserEntity struct {
	ID        int64
	Username  string
	Password  string
	Email     string
	CreatedAt time.Time
}

func (UserEntity) TableName

func (UserEntity) TableName() string

Jump to

Keyboard shortcuts

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