Documentation ¶
Index ¶
- type Config
- type DataModel
- func (d *DataModel) AddNotification(pubID, source, title, message string, interests []string, ...) (sql.Result, error)
- func (d *DataModel) GetHistory(date time.Time) ([]NotificationRow, error)
- func (d *DataModel) GetRecentNotifications(limit int) ([]NotificationRow, error)
- func (d *DataModel) Init(location string)
- type Logger
- type NotificationRow
- type UserRow
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { LogFilePath string DBFilePath string InstanceID string SecretKey string Port string DiscordWebhookURL string DevMode bool }
config is the configuration struct
type DataModel ¶
func (*DataModel) AddNotification ¶
func (*DataModel) GetHistory ¶
func (d *DataModel) GetHistory(date time.Time) ([]NotificationRow, error)
func (*DataModel) GetRecentNotifications ¶
func (d *DataModel) GetRecentNotifications(limit int) ([]NotificationRow, error)
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
func (*Logger) ErrorWithField ¶
type NotificationRow ¶
type NotificationRow struct { PubID string `db:"pub_id" json:"pub_id"` Date string `db:"date" json:"date"` Source string `db:"source" json:"source"` Interests string `db:"interests" json:"interests"` Title string `db:"title" json:"title"` Message string `db:"message" json:"message"` Metadata string `db:"metadata" json:"metadata"` }
Click to show internal directories.
Click to hide internal directories.