package models // The User model represents a registered user. type User struct { ID int Name string PassHash []byte } // UserRepository is an interface for all database operations // the user model makes. type UserRepository interface { FindUserByID(id int) (User, error) FindUserByName(name string) (User, error) ListUsers() ([]User, error) InsertUser(user User) (int, error) UpdateUser(user User) error RemoveUser(user User) error }