Documentation
¶
Index ¶
- type IAlertTable
- type IConvectiveOutlookTable
- type IDeviceTable
- type IPostgresMesoscaleDiscussionTable
- type IUserNotificationTable
- type PostgresAlertTable
- func (p *PostgresAlertTable) Delete(id string) error
- func (p *PostgresAlertTable) DeleteExpiredAlerts(id string) error
- func (p *PostgresAlertTable) Exists(id string) (bool, error)
- func (p *PostgresAlertTable) Insert(alert data_structures.Alert) error
- func (p *PostgresAlertTable) Select(id string) (*data_structures.Alert, error)
- func (p *PostgresAlertTable) SelectAlertsByCode(codes []string) ([]data_structures.Alert, error)
- type PostgresConvectiveOutlookTable
- func (p *PostgresConvectiveOutlookTable) Insert(outlook data_structures.ConvectiveOutlook) error
- func (p *PostgresConvectiveOutlookTable) Select(publishedTime time.Time, outlookType golang.ConvectiveOutlookType) (*data_structures.ConvectiveOutlook, error)
- func (p *PostgresConvectiveOutlookTable) SelectLatest(outlookType golang.ConvectiveOutlookType) (*data_structures.ConvectiveOutlook, error)
- type PostgresDeviceTable
- func (p PostgresDeviceTable) Delete(id string) error
- func (p PostgresDeviceTable) Insert(device data_structures.Device) error
- func (p PostgresDeviceTable) Select(id string) (*data_structures.Device, error)
- func (p PostgresDeviceTable) SelectByUser(userId string) ([]data_structures.Device, error)
- func (p PostgresDeviceTable) UpdateApnsToken(id, apnsToken string) error
- type PostgresMesoscaleDiscussionTable
- func (p *PostgresMesoscaleDiscussionTable) Delete(year, mdNumber int) error
- func (p *PostgresMesoscaleDiscussionTable) Insert(md data_structures.MesoscaleDiscussion) error
- func (p *PostgresMesoscaleDiscussionTable) Select(year, mdNumber int) (*data_structures.MesoscaleDiscussion, error)
- func (p *PostgresMesoscaleDiscussionTable) SelectMDNotInTable(year int, mdsToCheck map[int]bool) ([]int, error)
- type PostgresUserNotificationTable
- func (p *PostgresUserNotificationTable) Delete(notificationId string) error
- func (p *PostgresUserNotificationTable) Insert(userNotification data_structures.UserNotification) error
- func (p *PostgresUserNotificationTable) Select(id string) (*data_structures.UserNotification, error)
- func (p *PostgresUserNotificationTable) SelectAll() ([]data_structures.UserNotification, error)
- func (p *PostgresUserNotificationTable) SelectByCodes(codes []string) ([]data_structures.UserNotification, error)
- func (p *PostgresUserNotificationTable) SelectByUserId(userId string) ([]data_structures.UserNotification, error)
- func (p *PostgresUserNotificationTable) SelectNotificationsWithConvectiveOutlook() ([]data_structures.UserNotification, error)
- func (p *PostgresUserNotificationTable) SelectNotificationsWithMDNotifications() ([]data_structures.UserNotification, error)
- func (p *PostgresUserNotificationTable) Update(id string, userNotification data_structures.UserNotification) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IAlertTable ¶
type IAlertTable interface {
common_tables.IIdTable[data_structures.Alert]
SelectAlertsByCode(codes []string) ([]data_structures.Alert, error)
DeleteExpiredAlerts(id string) error
Exists(id string) (bool, error)
}
type IConvectiveOutlookTable ¶
type IConvectiveOutlookTable interface {
Insert(outlook data_structures.ConvectiveOutlook) error
Select(publishedTime time.Time, outlookType golang.ConvectiveOutlookType) (*data_structures.ConvectiveOutlook, error)
SelectLatest(outlookType golang.ConvectiveOutlookType) (*data_structures.ConvectiveOutlook, error)
}
type IDeviceTable ¶ added in v4.2.0
type IDeviceTable interface {
common_tables.IIdTable[data_structures.Device]
SelectByUser(userId string) ([]data_structures.Device, error)
UpdateApnsToken(id, apnsToken string) error
}
type IPostgresMesoscaleDiscussionTable ¶
type IPostgresMesoscaleDiscussionTable interface {
Insert(md data_structures.MesoscaleDiscussion) error
Select(mdNumber int, year int) (*data_structures.MesoscaleDiscussion, error)
SelectMDNotInTable(year int, mdsToCheck map[int]bool) ([]int, error)
}
type IUserNotificationTable ¶
type IUserNotificationTable interface {
common_tables.IIdTable[data_structures.UserNotification]
SelectAll() ([]data_structures.UserNotification, error)
SelectByUserId(userId string) ([]data_structures.UserNotification, error)
SelectByCodes(codes []string) ([]data_structures.UserNotification, error)
SelectNotificationsWithMDNotifications() ([]data_structures.UserNotification, error)
SelectNotificationsWithConvectiveOutlook() ([]data_structures.UserNotification, error)
Update(id string, userNotification data_structures.UserNotification) error
}
type PostgresAlertTable ¶
type PostgresAlertTable struct {
// contains filtered or unexported fields
}
func NewPostgresAlertTable ¶
func NewPostgresAlertTable(db *sql.DB) PostgresAlertTable
func (*PostgresAlertTable) Delete ¶
func (p *PostgresAlertTable) Delete(id string) error
func (*PostgresAlertTable) DeleteExpiredAlerts ¶
func (p *PostgresAlertTable) DeleteExpiredAlerts(id string) error
func (*PostgresAlertTable) Insert ¶
func (p *PostgresAlertTable) Insert(alert data_structures.Alert) error
func (*PostgresAlertTable) Select ¶
func (p *PostgresAlertTable) Select(id string) (*data_structures.Alert, error)
func (*PostgresAlertTable) SelectAlertsByCode ¶
func (p *PostgresAlertTable) SelectAlertsByCode(codes []string) ([]data_structures.Alert, error)
type PostgresConvectiveOutlookTable ¶
type PostgresConvectiveOutlookTable struct {
// contains filtered or unexported fields
}
func NewPostgresConvectiveOutlookTable ¶
func NewPostgresConvectiveOutlookTable(db *sql.DB) PostgresConvectiveOutlookTable
func (*PostgresConvectiveOutlookTable) Insert ¶
func (p *PostgresConvectiveOutlookTable) Insert(outlook data_structures.ConvectiveOutlook) error
func (*PostgresConvectiveOutlookTable) Select ¶
func (p *PostgresConvectiveOutlookTable) Select(publishedTime time.Time, outlookType golang.ConvectiveOutlookType) (*data_structures.ConvectiveOutlook, error)
func (*PostgresConvectiveOutlookTable) SelectLatest ¶
func (p *PostgresConvectiveOutlookTable) SelectLatest(outlookType golang.ConvectiveOutlookType) (*data_structures.ConvectiveOutlook, error)
type PostgresDeviceTable ¶ added in v4.2.0
type PostgresDeviceTable struct {
// contains filtered or unexported fields
}
func NewPostgresDeviceTable ¶ added in v4.2.0
func NewPostgresDeviceTable(db *sql.DB) PostgresDeviceTable
func (PostgresDeviceTable) Delete ¶ added in v4.2.0
func (p PostgresDeviceTable) Delete(id string) error
func (PostgresDeviceTable) Insert ¶ added in v4.2.0
func (p PostgresDeviceTable) Insert(device data_structures.Device) error
func (PostgresDeviceTable) Select ¶ added in v4.2.0
func (p PostgresDeviceTable) Select(id string) (*data_structures.Device, error)
func (PostgresDeviceTable) SelectByUser ¶ added in v4.2.0
func (p PostgresDeviceTable) SelectByUser(userId string) ([]data_structures.Device, error)
func (PostgresDeviceTable) UpdateApnsToken ¶ added in v4.2.0
func (p PostgresDeviceTable) UpdateApnsToken(id, apnsToken string) error
type PostgresMesoscaleDiscussionTable ¶
type PostgresMesoscaleDiscussionTable struct {
// contains filtered or unexported fields
}
func NewPostgresMesoscaleDicussionTable ¶
func NewPostgresMesoscaleDicussionTable(db *sql.DB) PostgresMesoscaleDiscussionTable
func (*PostgresMesoscaleDiscussionTable) Delete ¶
func (p *PostgresMesoscaleDiscussionTable) Delete(year, mdNumber int) error
func (*PostgresMesoscaleDiscussionTable) Insert ¶
func (p *PostgresMesoscaleDiscussionTable) Insert(md data_structures.MesoscaleDiscussion) error
func (*PostgresMesoscaleDiscussionTable) Select ¶
func (p *PostgresMesoscaleDiscussionTable) Select(year, mdNumber int) (*data_structures.MesoscaleDiscussion, error)
func (*PostgresMesoscaleDiscussionTable) SelectMDNotInTable ¶
type PostgresUserNotificationTable ¶
type PostgresUserNotificationTable struct {
// contains filtered or unexported fields
}
func NewPostgresUserNotificationTable ¶
func NewPostgresUserNotificationTable(db *sql.DB) PostgresUserNotificationTable
func (*PostgresUserNotificationTable) Delete ¶
func (p *PostgresUserNotificationTable) Delete(notificationId string) error
func (*PostgresUserNotificationTable) Insert ¶
func (p *PostgresUserNotificationTable) Insert(userNotification data_structures.UserNotification) error
func (*PostgresUserNotificationTable) Select ¶
func (p *PostgresUserNotificationTable) Select(id string) (*data_structures.UserNotification, error)
func (*PostgresUserNotificationTable) SelectAll ¶
func (p *PostgresUserNotificationTable) SelectAll() ([]data_structures.UserNotification, error)
func (*PostgresUserNotificationTable) SelectByCodes ¶
func (p *PostgresUserNotificationTable) SelectByCodes(codes []string) ([]data_structures.UserNotification, error)
func (*PostgresUserNotificationTable) SelectByUserId ¶
func (p *PostgresUserNotificationTable) SelectByUserId(userId string) ([]data_structures.UserNotification, error)
func (*PostgresUserNotificationTable) SelectNotificationsWithConvectiveOutlook ¶
func (p *PostgresUserNotificationTable) SelectNotificationsWithConvectiveOutlook() ([]data_structures.UserNotification, error)
func (*PostgresUserNotificationTable) SelectNotificationsWithMDNotifications ¶
func (p *PostgresUserNotificationTable) SelectNotificationsWithMDNotifications() ([]data_structures.UserNotification, error)
SelectNotificationsWithMDNotifications Selects all of the notifications that want mesoscale discussion notifications. Note this does not fill out AlertOptions or SPCOptions in the returned UserNotifications struct
func (*PostgresUserNotificationTable) Update ¶
func (p *PostgresUserNotificationTable) Update(id string, userNotification data_structures.UserNotification) error
Source Files
¶
Click to show internal directories.
Click to hide internal directories.