Skip to content

Commit

Permalink
Merge b5a65e5 into d295396
Browse files Browse the repository at this point in the history
  • Loading branch information
mtlynch committed Mar 22, 2017
2 parents d295396 + b5a65e5 commit b6bc888
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions account/account.go
Expand Up @@ -2,7 +2,6 @@ package account

import (
"encoding/json"
"errors"
"time"

"github.com/mtlynch/prosperbot/redis"
Expand All @@ -20,12 +19,15 @@ type (

accountAttributeFunc func(r redis.AccountRecord) float64

// AccountAttributeRecord represents a timestamped value-based property of the
// user's account (e.g. total value, cash balance).
AccountAttributeRecord struct {
Value float64
Timestamp time.Time
}
)

// NewAccountInfoManager creates a new accountInfoManager.
func NewAccountInfoManager() (accountInfoManager, error) {
r, err := redis.New()
if err != nil {
Expand All @@ -34,8 +36,6 @@ func NewAccountInfoManager() (accountInfoManager, error) {
return accountInfoManager{r}, nil
}

var ErrNoAccountRecords = errors.New("no record of account cash balance")

func accountRecordToAccountAttributeRecord(r redis.AccountRecord, f accountAttributeFunc) AccountAttributeRecord {
return AccountAttributeRecord{
Value: f(r),
Expand Down

0 comments on commit b6bc888

Please sign in to comment.