mysql

package
v0.0.0-...-7df14c5 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NoteModel

type NoteModel struct {
	DB *sql.DB
}

func (*NoteModel) Get

func (m *NoteModel) Get(id int) (*models.Note, error)

func (*NoteModel) Insert

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

func (*NoteModel) Latest

func (m *NoteModel) Latest() ([]*models.Note, error)

10 most recently creates notes

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, oldpass, newpass 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