package models // User represents the full DB user field, for inserts and compares. // No reason to return the hashed pw on the route though. type User struct { UserID int64 `json:"user_id"` Username string `json:"username"` DisplayName string `json:"display_name"` Password []byte `json:"password"` } // User returns a single plan from the store by plan_id. func (m *Model) User(id int) (*User, error) { user, err := m.SelectUserByID(id) return user, wrapNotFound(err) } // AddUser inserts a user into the store. // func (m *Model) AddUser(u *User) (int, error) { // return m.InsertUser(u) // }