Versions in this module Expand all Collapse all v0 v0.2.0 Oct 30, 2022 Changes in this version type TestDB + TestFunc func(...Samples) v0.1.0 Oct 28, 2022 Changes in this version + type DB interface + AddSamples func(samples ...Samples) + SetupDefaults func() + type GormDB struct + func NewPostgresDB(pgdb PostgresDB) (*GormDB, error) + func (gdb *GormDB) AddSamples(samples ...Samples) + func (gdb *GormDB) SetupDefaults() + type TestDB struct + func (tdb *TestDB) AddSamples(samples ...Samples) + func (tdb *TestDB) SetupDefaults() v0.0.1 Oct 28, 2021 Changes in this version + func Setup(gdb *gorm.DB, obj interface{}) + func SetupDefault(gdb *gorm.DB) + func SetupHypertable(gdb *gorm.DB) + type Outcome struct + BadgeSetID string + BadgeVersion string + Color string + OutcomeID string + Title string + TopPredictors []Predictor + TotalPoints int + TotalUsers int + type PostgresDB struct + DBName string + Host string + Password string + Port int + SSLMode string + TimeZone string + User string + func (pgdb PostgresDB) NewDB() (*gorm.DB, error) + type Predictor struct + ChannelID string + Color string + EventID string + OutcomeID string + Points int + PredictedAt time.Time + PredictorID string + ResultIsAcknowledged bool + ResultPointsWon int + ResultType string + UpdatedAt time.Time + UserDisplayName string + UserID string + type Samples struct + BlueID string + BlueTitle string + BlueTotalPoints int + BlueTotalUsers int + BlueWon bool + ChannelID string + ChannelName string + CreatedAt time.Time + CreatedBy string + EndedAt time.Time + EndedBy string + EventID string + LockedAt time.Time + LockedBy string + PinkID string + PinkTitle string + PinkTotalPoints int + PinkTotalUsers int + PinkWon bool + PredictionWindowSeconds int + Predictors []Predictor + Status string + Timestamp time.Time + Title string + func ToSamples(e *event.Data, channel string) Samples