GetAccount returns the account object of specified keypair.
(db *gorp.DbMap, developer int64, account utils.AccountAddress)
| 168 | |
| 169 | // GetAccount returns the account object of specified keypair. |
| 170 | func GetAccount(db *gorp.DbMap, developer int64, account utils.AccountAddress) (p *DeveloperPrivateKey, err error) { |
| 171 | err = db.SelectOne(&p, |
| 172 | `SELECT * FROM "private_keys" WHERE "account" = ? AND "developer_id" = ? LIMIT 1`, |
| 173 | account, developer) |
| 174 | if err != nil { |
| 175 | err = errors.Wrapf(err, "get account info failed") |
| 176 | } |
| 177 | return |
| 178 | } |
| 179 | |
| 180 | // GetAllAccounts returns all accounts of developer. |
| 181 | func GetAllAccounts(db *gorp.DbMap, developer int64) (keys []*DeveloperPrivateKey, err error) { |
no outgoing calls
no test coverage detected