Returns the user account row of a user by looking up on email
(username string, transaction *sqlx.Tx)
| 182 | |
| 183 | // Returns the user account row of a user by looking up on email |
| 184 | func (dbResource *DbResource) GetUserMailAccountRowByEmail(username string, transaction *sqlx.Tx) (map[string]interface{}, error) { |
| 185 | |
| 186 | mailAccount, _, err := dbResource.Cruds["mail_account"].GetRowsByWhereClause("mail_account", |
| 187 | nil, transaction, goqu.Ex{"username": username}) |
| 188 | |
| 189 | if len(mailAccount) > 0 { |
| 190 | |
| 191 | return mailAccount[0], err |
| 192 | } |
| 193 | |
| 194 | return nil, errors.New("no such mail account") |
| 195 | |
| 196 | } |
| 197 | |
| 198 | // Returns the user mail account box row of a user |
| 199 | func (dbResource *DbResource) GetMailAccountBox(mailAccountId int64, mailBoxName string, transaction *sqlx.Tx) (map[string]interface{}, error) { |
no test coverage detected