Documentation ¶
Index ¶
- Constants
- func MustConnectDatabase(dbConfig *Database, testing bool) (*gorm.DB, error)
- func MustConnectDatabaseWithName(dbConfig *Database, dbName string, testing bool) (*gorm.DB, error)
- func NewEventStore(db *gorm.DB) *eventStore
- func NewJobStore(db *gorm.DB) *jobStore
- func NewProcessedBlockStore(db *gorm.DB) *processedBlockStore
- type Database
- type EventStore
- type JobStore
- type MainStore
- type ProcessedBlockStore
- type SearchJobs
Constants ¶
View Source
const ( STATUS_PENDING = "pending" STATUS_FAILED = "failed" STATUS_PROCESSING = "processing" STATUS_DONE = "done" STATUS_PROCESSED = "processed" )
Variables ¶
This section is empty.
Functions ¶
func MustConnectDatabase ¶
func NewEventStore ¶
func NewJobStore ¶
func NewProcessedBlockStore ¶
Types ¶
type Database ¶
type Database struct { Host string `json:"host" mapstructure:"host"` User string `json:"user" mapstructure:"user"` Password string `json:"password" mapstructure:"password"` DBName string `json:"dbName" mapstructure:"dbName"` Port int `json:"port" mapstructure:"port"` ConnMaxLifetime int `json:"connMaxLifeTime" mapstructure:"connMaxLifeTime"` MaxIdleConns int `json:"maxIdleConns" mapstructure:"maxIdleConns"` MaxOpenConns int `json:"maxOpenConns" mapstructure:"maxOpenConns"` }
type EventStore ¶
type MainStore ¶
type MainStore interface { GetDB() *gorm.DB GetJobStore() JobStore GetProcessedBlockStore() ProcessedBlockStore GetEventStore() EventStore }
func NewMainStore ¶
type ProcessedBlockStore ¶
Click to show internal directories.
Click to hide internal directories.