Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
DbConn *sql.DB
)
DbConn stores the connexion to the database
Functions ¶
Types ¶
type Article ¶
type Article struct { ID string `json:"aggregate_article_id"` Title string `json:"title"` Description string `json:"description"` }
Article data model on elasticsearch database (index called read-model)
type Config ¶
type Config struct { DbHost string `env:"DB_HOST"` DbName string `env:"MYSQL_DATABASE"` DbUser string `env:"MYSQL_USER"` DbPassword string `env:"MYSQL_PASSWORD"` DbConn *sql.DB }
Config for DB connection
type Event ¶
type Event struct { ID string `json:"event_id"` EventType string `json:"event_type"` CreatedAt string `json:"created_at"` Payload Article `json:"payload"` }
Event data model on elasticsearch database (index called event-store)
type RequestCreateEvent ¶
type RequestCreateEvent struct { Title string `json:"title"` Description string `json:"description"` EventType string `json:"event_type"` }
RequestCreateEvent request to create an event on elasticsearch database
Click to show internal directories.
Click to hide internal directories.