Documentation
¶
Index ¶
- type AlertNotification
- type ConvectiveOutlookNotification
- type IAlertTabledeprecated
- type IAlertV2Table
- type IConvectiveOutlookTabledeprecated
- type IConvectiveOutlookTableV2
- type IDeviceTable
- type IMesoscaleDiscussionV2Table
- type INotificationQueries
- type IPostgresMesoscaleDiscussionTabledeprecated
- type IUserNotificationTable
- type MesoscaleDiscussionNotification
- type PostgresAlertTabledeprecated
- func (p *PostgresAlertTable) Delete(id string) errordeprecated
- func (p *PostgresAlertTable) DeleteExpiredAlerts(id string) errordeprecated
- func (p *PostgresAlertTable) Exists(id string) (bool, error)deprecated
- func (p *PostgresAlertTable) Insert(alert data_structures.Alert) errordeprecated
- func (p *PostgresAlertTable) Select(id string) (*data_structures.Alert, error)deprecated
- func (p *PostgresAlertTable) SelectAlertsByCode(codes []string) ([]data_structures.Alert, error)deprecated
- type PostgresAlertV2Table
- func (p *PostgresAlertV2Table) Delete(id string) error
- func (p *PostgresAlertV2Table) Exists(id string) (bool, error)
- func (p *PostgresAlertV2Table) Insert(alert data_structures.AlertV2) error
- func (p *PostgresAlertV2Table) Select(id string) (*data_structures.AlertV2, error)
- func (p *PostgresAlertV2Table) SelectByLocation(codes []string, point geojson_v2.Point) ([]data_structures.AlertV2, error)
- type PostgresConvectiveOutlookTabledeprecated
- func (p *PostgresConvectiveOutlookTable) Insert(outlook data_structures.ConvectiveOutlook) errordeprecated
- func (p *PostgresConvectiveOutlookTable) Select(publishedTime time.Time, outlookType golang.ConvectiveOutlookType) (*data_structures.ConvectiveOutlook, error)deprecated
- func (p *PostgresConvectiveOutlookTable) SelectLatest(outlookType golang.ConvectiveOutlookType) (*data_structures.ConvectiveOutlook, error)deprecated
- type PostgresConvectiveOutlookTableV2
- func (p *PostgresConvectiveOutlookTableV2) Insert(outlooks []data_structures.ConvectiveOutlookV2) error
- func (p *PostgresConvectiveOutlookTableV2) Select(issuedTime time.Time, outlookType golang.ConvectiveOutlookType) ([]data_structures.ConvectiveOutlookV2, error)
- func (p *PostgresConvectiveOutlookTableV2) SelectAllLatest() (map[golang.ConvectiveOutlookType][]data_structures.ConvectiveOutlookV2, error)
- func (p *PostgresConvectiveOutlookTableV2) SelectAllLatestByLocation(point geojson_v2.Point) ([]data_structures.ConvectiveOutlookV2, error)
- func (p *PostgresConvectiveOutlookTableV2) SelectById(id string) ([]data_structures.ConvectiveOutlookV2, error)
- func (p *PostgresConvectiveOutlookTableV2) SelectLatest(outlookType golang.ConvectiveOutlookType) ([]data_structures.ConvectiveOutlookV2, 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 PostgresMesoscaleDiscussionTabledeprecated
- func (p *PostgresMesoscaleDiscussionTable) Delete(year, mdNumber int) errordeprecated
- func (p *PostgresMesoscaleDiscussionTable) Insert(md data_structures.MesoscaleDiscussion) errordeprecated
- func (p *PostgresMesoscaleDiscussionTable) Select(year, mdNumber int) (*data_structures.MesoscaleDiscussion, error)deprecated
- func (p *PostgresMesoscaleDiscussionTable) SelectMDNotInTable(year int, mdsToCheck map[int]bool) ([]int, error)deprecated
- type PostgresMesoscaleDiscussionV2Table
- func (p *PostgresMesoscaleDiscussionV2Table) Delete(year, mdNumber int) error
- func (p *PostgresMesoscaleDiscussionV2Table) Insert(md data_structures.MesoscaleDiscussionV2) error
- func (p *PostgresMesoscaleDiscussionV2Table) Select(year, mdNumber int) (*data_structures.MesoscaleDiscussionV2, error)
- func (p *PostgresMesoscaleDiscussionV2Table) SelectById(id string) (*data_structures.MesoscaleDiscussionV2, error)
- func (p *PostgresMesoscaleDiscussionV2Table) SelectLatest() ([]data_structures.MesoscaleDiscussionV2, error)
- func (p *PostgresMesoscaleDiscussionV2Table) SelectLatestByLocation(point geojson_v2.Point) ([]data_structures.MesoscaleDiscussionV2, error)
- func (p *PostgresMesoscaleDiscussionV2Table) SelectMDNotInTable(year int, mdsToCheck map[int]bool) ([]int, error)
- type PostgresNotificationQueries
- func (n *PostgresNotificationQueries) GetDevicesForAlertId(alertId string) ([]AlertNotification, error)
- func (n *PostgresNotificationQueries) GetDevicesForConvectiveOutlookId(convectiveOutlookId string) ([]ConvectiveOutlookNotification, error)
- func (n *PostgresNotificationQueries) GetDevicesForMesoscaleDiscussion(mesoscaleDiscussionId string) ([]MesoscaleDiscussionNotification, 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 AlertNotification ¶ added in v4.3.0
type AlertNotification struct { Device data_structures.Device LocationName string }
type ConvectiveOutlookNotification ¶ added in v4.3.0
type ConvectiveOutlookNotification struct { Device data_structures.Device LocationName string ConvectiveOutlookLabel string }
type IAlertTable
deprecated
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) }
Deprecated: use IAlertTableV2
type IAlertV2Table ¶ added in v4.3.0
type IAlertV2Table interface { common_tables.IIdTable[data_structures.AlertV2] SelectByLocation(codes []string, point geojson_v2.Point) ([]data_structures.AlertV2, error) Exists(id string) (bool, error) }
type IConvectiveOutlookTable
deprecated
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) }
Deprecated: use IConvectiveOutlookTableV2
type IConvectiveOutlookTableV2 ¶ added in v4.3.0
type IConvectiveOutlookTableV2 interface { Insert(outlooks []data_structures.ConvectiveOutlookV2) error Select(publishedTime time.Time, outlookType golang.ConvectiveOutlookType) ([]data_structures.ConvectiveOutlookV2, error) SelectById(id string) ([]data_structures.ConvectiveOutlookV2, error) SelectLatest(outlookType golang.ConvectiveOutlookType) ([]data_structures.ConvectiveOutlookV2, error) SelectAllLatest() (map[golang.ConvectiveOutlookType][]data_structures.ConvectiveOutlookV2, error) SelectAllLatestByLocation(point geojson_v2.Point) ([]data_structures.ConvectiveOutlookV2, 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 IMesoscaleDiscussionV2Table ¶ added in v4.3.0
type IMesoscaleDiscussionV2Table interface { Insert(md data_structures.MesoscaleDiscussionV2) error Select(mdNumber int, year int) (*data_structures.MesoscaleDiscussionV2, error) SelectById(id string) (*data_structures.MesoscaleDiscussionV2, error) SelectMDNotInTable(year int, mdsToCheck map[int]bool) ([]int, error) SelectLatestByLocation(point geojson_v2.Point) ([]data_structures.MesoscaleDiscussionV2, error) SelectLatest() ([]data_structures.MesoscaleDiscussionV2, error) Delete(year, mdNumber int) error }
type INotificationQueries ¶ added in v4.3.0
type INotificationQueries interface { GetDevicesForAlertId(alertId string) ([]AlertNotification, error) GetDevicesForConvectiveOutlookId(convectiveOutlookId string) ([]ConvectiveOutlookNotification, error) GetDevicesForMesoscaleDiscussion(mesoscaleDiscussionId string) ([]MesoscaleDiscussionNotification, error) }
type IPostgresMesoscaleDiscussionTable
deprecated
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) }
Deprecated: use IPostgresMesoscaleDiscussionTableV2
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 MesoscaleDiscussionNotification ¶ added in v4.3.0
type MesoscaleDiscussionNotification struct { Device data_structures.Device LocationName string }
type PostgresAlertTable
deprecated
type PostgresAlertTable struct {
// contains filtered or unexported fields
}
Deprecated: use PostgresAlertTableV2
func NewPostgresAlertTable
deprecated
func NewPostgresAlertTable(db *sql.DB) PostgresAlertTable
Deprecated: use NewPostgresAlertTableV2
func (*PostgresAlertTable) Delete
deprecated
func (p *PostgresAlertTable) Delete(id string) error
Deprecated:
func (*PostgresAlertTable) DeleteExpiredAlerts
deprecated
func (p *PostgresAlertTable) DeleteExpiredAlerts(id string) error
Deprecated:
func (*PostgresAlertTable) Exists
deprecated
func (p *PostgresAlertTable) Exists(id string) (bool, error)
Deprecated:
func (*PostgresAlertTable) Insert
deprecated
func (p *PostgresAlertTable) Insert(alert data_structures.Alert) error
Deprecated:
func (*PostgresAlertTable) Select
deprecated
func (p *PostgresAlertTable) Select(id string) (*data_structures.Alert, error)
Deprecated:
func (*PostgresAlertTable) SelectAlertsByCode
deprecated
func (p *PostgresAlertTable) SelectAlertsByCode(codes []string) ([]data_structures.Alert, error)
Deprecated:
type PostgresAlertV2Table ¶ added in v4.3.0
type PostgresAlertV2Table struct {
// contains filtered or unexported fields
}
func NewPostgresAlertV2Table ¶ added in v4.3.0
func NewPostgresAlertV2Table(db *sql.DB) PostgresAlertV2Table
func (*PostgresAlertV2Table) Delete ¶ added in v4.3.0
func (p *PostgresAlertV2Table) Delete(id string) error
func (*PostgresAlertV2Table) Exists ¶ added in v4.3.0
func (p *PostgresAlertV2Table) Exists(id string) (bool, error)
func (*PostgresAlertV2Table) Insert ¶ added in v4.3.0
func (p *PostgresAlertV2Table) Insert(alert data_structures.AlertV2) error
func (*PostgresAlertV2Table) Select ¶ added in v4.3.0
func (p *PostgresAlertV2Table) Select(id string) (*data_structures.AlertV2, error)
func (*PostgresAlertV2Table) SelectByLocation ¶ added in v4.3.0
func (p *PostgresAlertV2Table) SelectByLocation(codes []string, point geojson_v2.Point) ([]data_structures.AlertV2, error)
type PostgresConvectiveOutlookTable
deprecated
type PostgresConvectiveOutlookTable struct {
// contains filtered or unexported fields
}
Deprecated: use PostgresConvectiveOutlookTableV2
func NewPostgresConvectiveOutlookTable
deprecated
func NewPostgresConvectiveOutlookTable(db *sql.DB) PostgresConvectiveOutlookTable
Deprecated: use NewPostgresConvectiveOutlookTableV2
func (*PostgresConvectiveOutlookTable) Insert
deprecated
func (p *PostgresConvectiveOutlookTable) Insert(outlook data_structures.ConvectiveOutlook) error
Deprecated:
func (*PostgresConvectiveOutlookTable) Select
deprecated
func (p *PostgresConvectiveOutlookTable) Select(publishedTime time.Time, outlookType golang.ConvectiveOutlookType) (*data_structures.ConvectiveOutlook, error)
Deprecated:
func (*PostgresConvectiveOutlookTable) SelectLatest
deprecated
func (p *PostgresConvectiveOutlookTable) SelectLatest(outlookType golang.ConvectiveOutlookType) (*data_structures.ConvectiveOutlook, error)
Deprecated:
type PostgresConvectiveOutlookTableV2 ¶ added in v4.3.0
type PostgresConvectiveOutlookTableV2 struct {
// contains filtered or unexported fields
}
func NewPostgresConvectiveOutlookTableV2 ¶ added in v4.3.0
func NewPostgresConvectiveOutlookTableV2(db *sql.DB) PostgresConvectiveOutlookTableV2
func (*PostgresConvectiveOutlookTableV2) Insert ¶ added in v4.3.0
func (p *PostgresConvectiveOutlookTableV2) Insert(outlooks []data_structures.ConvectiveOutlookV2) error
func (*PostgresConvectiveOutlookTableV2) Select ¶ added in v4.3.0
func (p *PostgresConvectiveOutlookTableV2) Select(issuedTime time.Time, outlookType golang.ConvectiveOutlookType) ([]data_structures.ConvectiveOutlookV2, error)
func (*PostgresConvectiveOutlookTableV2) SelectAllLatest ¶ added in v4.6.0
func (p *PostgresConvectiveOutlookTableV2) SelectAllLatest() (map[golang.ConvectiveOutlookType][]data_structures.ConvectiveOutlookV2, error)
func (*PostgresConvectiveOutlookTableV2) SelectAllLatestByLocation ¶ added in v4.6.0
func (p *PostgresConvectiveOutlookTableV2) SelectAllLatestByLocation(point geojson_v2.Point) ([]data_structures.ConvectiveOutlookV2, error)
func (*PostgresConvectiveOutlookTableV2) SelectById ¶ added in v4.3.0
func (p *PostgresConvectiveOutlookTableV2) SelectById(id string) ([]data_structures.ConvectiveOutlookV2, error)
func (*PostgresConvectiveOutlookTableV2) SelectLatest ¶ added in v4.3.0
func (p *PostgresConvectiveOutlookTableV2) SelectLatest(outlookType golang.ConvectiveOutlookType) ([]data_structures.ConvectiveOutlookV2, 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
deprecated
type PostgresMesoscaleDiscussionTable struct {
// contains filtered or unexported fields
}
Deprecated: use PostgresMesoscaleDiscussionTableV2
func NewPostgresMesoscaleDicussionTable
deprecated
func NewPostgresMesoscaleDicussionTable(db *sql.DB) PostgresMesoscaleDiscussionTable
Deprecated: use NewPostgresMesoscaleDicussionTableV2
func (*PostgresMesoscaleDiscussionTable) Delete
deprecated
func (p *PostgresMesoscaleDiscussionTable) Delete(year, mdNumber int) error
Deprecated:
func (*PostgresMesoscaleDiscussionTable) Insert
deprecated
func (p *PostgresMesoscaleDiscussionTable) Insert(md data_structures.MesoscaleDiscussion) error
Deprecated:
func (*PostgresMesoscaleDiscussionTable) Select
deprecated
func (p *PostgresMesoscaleDiscussionTable) Select(year, mdNumber int) (*data_structures.MesoscaleDiscussion, error)
Deprecated:
func (*PostgresMesoscaleDiscussionTable) SelectMDNotInTable
deprecated
type PostgresMesoscaleDiscussionV2Table ¶ added in v4.3.0
type PostgresMesoscaleDiscussionV2Table struct {
// contains filtered or unexported fields
}
func NewPostgresMesoscaleDiscussionV2Table ¶ added in v4.3.0
func NewPostgresMesoscaleDiscussionV2Table(db *sql.DB) PostgresMesoscaleDiscussionV2Table
func (*PostgresMesoscaleDiscussionV2Table) Delete ¶ added in v4.3.0
func (p *PostgresMesoscaleDiscussionV2Table) Delete(year, mdNumber int) error
func (*PostgresMesoscaleDiscussionV2Table) Insert ¶ added in v4.3.0
func (p *PostgresMesoscaleDiscussionV2Table) Insert(md data_structures.MesoscaleDiscussionV2) error
func (*PostgresMesoscaleDiscussionV2Table) Select ¶ added in v4.3.0
func (p *PostgresMesoscaleDiscussionV2Table) Select(year, mdNumber int) (*data_structures.MesoscaleDiscussionV2, error)
func (*PostgresMesoscaleDiscussionV2Table) SelectById ¶ added in v4.3.0
func (p *PostgresMesoscaleDiscussionV2Table) SelectById(id string) (*data_structures.MesoscaleDiscussionV2, error)
func (*PostgresMesoscaleDiscussionV2Table) SelectLatest ¶ added in v4.6.0
func (p *PostgresMesoscaleDiscussionV2Table) SelectLatest() ([]data_structures.MesoscaleDiscussionV2, error)
func (*PostgresMesoscaleDiscussionV2Table) SelectLatestByLocation ¶ added in v4.6.0
func (p *PostgresMesoscaleDiscussionV2Table) SelectLatestByLocation(point geojson_v2.Point) ([]data_structures.MesoscaleDiscussionV2, error)
func (*PostgresMesoscaleDiscussionV2Table) SelectMDNotInTable ¶ added in v4.3.0
type PostgresNotificationQueries ¶ added in v4.3.0
type PostgresNotificationQueries struct {
// contains filtered or unexported fields
}
func NewNotificationQueries ¶ added in v4.3.0
func NewNotificationQueries(db *sql.DB) PostgresNotificationQueries
func (*PostgresNotificationQueries) GetDevicesForAlertId ¶ added in v4.3.0
func (n *PostgresNotificationQueries) GetDevicesForAlertId(alertId string) ([]AlertNotification, error)
func (*PostgresNotificationQueries) GetDevicesForConvectiveOutlookId ¶ added in v4.3.0
func (n *PostgresNotificationQueries) GetDevicesForConvectiveOutlookId(convectiveOutlookId string) ([]ConvectiveOutlookNotification, error)
func (*PostgresNotificationQueries) GetDevicesForMesoscaleDiscussion ¶ added in v4.3.0
func (n *PostgresNotificationQueries) GetDevicesForMesoscaleDiscussion(mesoscaleDiscussionId string) ([]MesoscaleDiscussionNotification, error)
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