Documentation ¶
Index ¶
- type Base
- func (b *Base) DeleteById(tx *sqlx.Tx, id int64) (sql.Result, error)
- func (b *Base) DeleteFromTable(tx *sqlx.Tx, where string) (sql.Result, error)
- func (b *Base) InsertIntoTable(tx *sqlx.Tx, data map[string]interface{}) (sql.Result, error)
- func (b *Base) UpdateByID(tx *sqlx.Tx, data map[string]interface{}, id int64) (sql.Result, error)
- func (b *Base) UpdateByKeyValueString(tx *sqlx.Tx, data map[string]interface{}, key, value string) (sql.Result, error)
- func (b *Base) UpdateFromTable(tx *sqlx.Tx, data map[string]interface{}, where string) (sql.Result, error)
- type User
- func (u *User) AllUsers(tx *sqlx.Tx) ([]*UserRow, error)
- func (u *User) GetByEmail(tx *sqlx.Tx, email string) (*UserRow, error)
- func (u *User) GetById(tx *sqlx.Tx, id int64) (*UserRow, error)
- func (u *User) GetUserByEmailAndPassword(tx *sqlx.Tx, email, password string) (*UserRow, error)
- func (u *User) Signup(tx *sqlx.Tx, email, password, passwordAgain string) (*UserRow, error)
- func (u *User) UpdateEmailAndPasswordById(tx *sqlx.Tx, userId int64, email, password, passwordAgain string) (*UserRow, error)
- type UserRow
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Base ¶
type Base struct {
// contains filtered or unexported fields
}
func (*Base) DeleteFromTable ¶
func (*Base) InsertIntoTable ¶
func (*Base) UpdateByID ¶
func (*Base) UpdateByKeyValueString ¶
type User ¶
type User struct {
Base
}
func (*User) GetByEmail ¶
GetByEmail returns record by email.
func (*User) GetUserByEmailAndPassword ¶
GetByEmail returns record by email but checks password first.
Click to show internal directories.
Click to hide internal directories.