tools

package
v0.0.0-...-b8ffb95 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2024 License: BSL-1.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const BCRYPT_COST = 14

Variables

This section is empty.

Functions

func AllNotesByUserID

func AllNotesByUserID(uid uint32, db *sql.DB) ([]data.Note, error)

func DeleteNoteByID

func DeleteNoteByID(note_id uint32, db *sql.DB) error

func HashPassword

func HashPassword(pwd string) (string, error)

func InsertNewNote

func InsertNewNote(uid uint32, title, content string, db *sql.DB) (uint32, error)

func IsUsernameValid

func IsUsernameValid(un string) bool

func NoteByID

func NoteByID(id uint32, db *sql.DB) (data.Note, error)

func UpdateNoteByID

func UpdateNoteByID(title, contents string, note_id uint32, db *sql.DB) error

func UserExists

func UserExists(username string, db *sql.DB) (bool, error)

func UserFromUsername

func UserFromUsername(username string, db *sql.DB) (data.User, error)

func UserInsert

func UserInsert(user data.User, db *sql.DB) error

func VerifyPassword

func VerifyPassword(hash string, pwd string) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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