Documentation ¶
Index ¶
- type DB
- func (db *DB) Disconnect()
- func (db *DB) GetAccountsForUser(ctx context.Context, userID gocql.UUID) ([]string, error)
- func (db *DB) GetSession() *gocql.Session
- func (db *DB) GetUserDailyRecordsForPeriod(ctx context.Context, userID gocql.UUID, accounts []string, period *Period) <-chan *DailyPortfolioStatsWithError
- func (db *DB) Init() error
- func (db *DB) SetSession(session *gocql.Session) error
- type DailyPortfolioStatsWithError
- type Period
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DB ¶
type DB struct {
// contains filtered or unexported fields
}
DB stores the session and model methods are defined on it
func (*DB) GetAccountsForUser ¶
GetAccountsForUser returns all accounts for a user
func (*DB) GetSession ¶
GetSession return session to satisfy HasSession interface
func (*DB) GetUserDailyRecordsForPeriod ¶
func (db *DB) GetUserDailyRecordsForPeriod(ctx context.Context, userID gocql.UUID, accounts []string, period *Period) <-chan *DailyPortfolioStatsWithError
GetUserDailyRecordsForPeriod returns
type DailyPortfolioStatsWithError ¶
type DailyPortfolioStatsWithError struct { Record *models.DailyPortfolioStats Error error }
DailyPortfolioStatsWithError contains DailyPortfolioStats record bundled with an error
Click to show internal directories.
Click to hide internal directories.