mysql

package
v0.0.0-...-b135e4b Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ScratchModel

type ScratchModel struct {
	DB *sql.DB
}

func (*ScratchModel) Get

func (m *ScratchModel) Get(id int) (*models.Scratch, error)

func (*ScratchModel) Insert

func (m *ScratchModel) Insert(title, content, expires string) (int, error)

func (*ScratchModel) Latest

func (m *ScratchModel) Latest() ([]*models.Scratch, error)

type UserModel

type UserModel struct {
	DB *sql.DB
}

func (*UserModel) Authenticate

func (m *UserModel) Authenticate(email, password string) (int, error)

func (*UserModel) ChangePassword

func (m *UserModel) ChangePassword(id int, currentPassword, newPassword string) error

func (*UserModel) Get

func (m *UserModel) Get(id int) (*models.User, error)

func (*UserModel) Insert

func (m *UserModel) Insert(name, email, password string) error

Jump to

Keyboard shortcuts

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