Documentation ¶
Index ¶
- func NewDatabase(conf config.Config) (*sql.DB, error)
- func NewServer(conf config.Config, logger log.Logger) *webServer
- func SetupDatabaseSchema(db *sql.DB, conf config.Config) error
- func TearDownDatabaseSchema(db *sql.DB, conf config.Config) error
- type BashbaorcRenderer
- type ConfigRenderer
- type DataSource
- type DataSourceRepository
- type DataSourceType
- type EventType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewDatabase ¶
NewDatabase creates a new database driver from passed config. Atm sqlite3 with local file is supported, only.
func SetupDatabaseSchema ¶
SetupDatabaseSChema ensures required data structures.
Types ¶
type BashbaorcRenderer ¶
type BashbaorcRenderer struct {
// contains filtered or unexported fields
}
type ConfigRenderer ¶
type ConfigRenderer struct {
// contains filtered or unexported fields
}
type DataSource ¶
type DataSourceRepository ¶
type DataSourceRepository struct {
// contains filtered or unexported fields
}
func NewDataSourceRepository ¶
func NewDataSourceRepository(db *sql.DB, logger log.Logger) *DataSourceRepository
func (*DataSourceRepository) Delete ¶
func (repo *DataSourceRepository) Delete(id string) error
func (*DataSourceRepository) Get ¶
func (repo *DataSourceRepository) Get(id string) (*DataSource, error)
func (*DataSourceRepository) List ¶
func (repo *DataSourceRepository) List() ([]DataSource, error)
func (*DataSourceRepository) Set ¶
func (repo *DataSourceRepository) Set(datasource DataSource) (*DataSource, error)
type DataSourceType ¶
type DataSourceType string
DataSourceType defines rechnical source of events, e.g. database, message broker, etc.
const ( // DATASOURCE_KAFKA. event conumed from topics in Kafka. DATASOURCE_KAFKA DataSourceType = "kafka" )
type EventType ¶
type EventType string
EventType defines events provided by a datasource, e.g. weather or indoor climate data
const ( // EVENTTYPE_WEATHER, weather data, current weather and hourly/daily forecasts EVENTTYPE_WEATHER EventType = "weather" // EVENTTYPE_AWSBILLING, billing report form AWS for current expenses. EVENTTYPE_AWSBILLING EventType = "awsbilling" // EVENTTYPE_INDOORCLIMATE. climate data (temperature/humidity) collected in different rooms. EVENTTYPE_INDOORCLIMATE EventType = "indoorclimate" )
Click to show internal directories.
Click to hide internal directories.