Documentation ¶
Index ¶
- type IAlertV2Table
- type IConvectiveOutlookTableV2
- type IDeviceTable
- type ILocationQueries
- type ILocationTable
- type IMesoscaleDiscussionV2Table
- type LocationOptionType
- 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 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 PostgresLocationQueries
- func (n *PostgresLocationQueries) GetDevicesForAlertID(alertId string) (map[data_structures.Device][]string, error)
- func (n *PostgresLocationQueries) GetDevicesForConvectiveOutlookID(convectiveOutlookId string) (map[string]map[data_structures.Device][]string, error)
- func (n *PostgresLocationQueries) GetDevicesForMesoscaleDiscussionID(mesoscaleDiscussionID string) (map[data_structures.Device][]string, error)
- type PostgresLocationTable
- func (p *PostgresLocationTable) Delete(locationID string) error
- func (p *PostgresLocationTable) Insert(location data_structures.Location) error
- func (p *PostgresLocationTable) Select(locationID string) (*data_structures.Location, error)
- func (p *PostgresLocationTable) SelectByCodes(codes []string) ([]data_structures.Location, error)
- func (p *PostgresLocationTable) SelectByDeviceID(deviceID string) ([]data_structures.Location, error)
- func (p *PostgresLocationTable) SelectByUserID(userID string) ([]data_structures.Location, error)
- func (p *PostgresLocationTable) SelectNotificationsWithConvectiveOutlook() ([]data_structures.Location, error)
- func (p *PostgresLocationTable) SelectNotificationsWithMDNotifications() ([]data_structures.Location, error)
- func (p *PostgresLocationTable) Update(location data_structures.Location) error
- 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)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IAlertV2Table ¶
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 IConvectiveOutlookTableV2 ¶
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 ¶
type IDeviceTable interface { common_tables.IIdTable[data_structures.Device] SelectByUser(userId string) ([]data_structures.Device, error) UpdateApnsToken(id, apnsToken string) error }
type ILocationQueries ¶
type ILocationQueries interface { GetDevicesForAlertID(alertID string) (map[data_structures.Device][]string, error) GetDevicesForConvectiveOutlookID(convectiveOutlookID string) (map[string]map[data_structures.Device][]string, error) GetDevicesForMesoscaleDiscussionID(mesoscaleDiscussionID string) (map[data_structures.Device][]string, error) }
type ILocationTable ¶
type ILocationTable interface { common_tables.IIdTable[data_structures.Location] SelectByUserID(userID string) ([]data_structures.Location, error) SelectByDeviceID(deviceID string) ([]data_structures.Location, error) SelectByCodes(codes []string) ([]data_structures.Location, error) SelectNotificationsWithMDNotifications() ([]data_structures.Location, error) SelectNotificationsWithConvectiveOutlook() ([]data_structures.Location, error) Update(location data_structures.Location) error }
type IMesoscaleDiscussionV2Table ¶
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 LocationOptionType ¶
type LocationOptionType int8
const ( LocationOptionType_AlertOption LocationOptionType = 0 LocationOptionType_ConvectiveOutlookOption LocationOptionType = 1 LocationOptionType_MesoscaleDiscussionNotifications LocationOptionType = 2 )
type PostgresAlertV2Table ¶
type PostgresAlertV2Table struct {
// contains filtered or unexported fields
}
func NewPostgresAlertV2Table ¶
func NewPostgresAlertV2Table(db *sql.DB) PostgresAlertV2Table
func (*PostgresAlertV2Table) Delete ¶
func (p *PostgresAlertV2Table) Delete(id string) error
func (*PostgresAlertV2Table) Exists ¶
func (p *PostgresAlertV2Table) Exists(id string) (bool, error)
func (*PostgresAlertV2Table) Insert ¶
func (p *PostgresAlertV2Table) Insert(alert data_structures.AlertV2) error
func (*PostgresAlertV2Table) Select ¶
func (p *PostgresAlertV2Table) Select(id string) (*data_structures.AlertV2, error)
func (*PostgresAlertV2Table) SelectByLocation ¶
func (p *PostgresAlertV2Table) SelectByLocation(codes []string, point geojson_v2.Point) ([]data_structures.AlertV2, error)
type PostgresConvectiveOutlookTableV2 ¶
type PostgresConvectiveOutlookTableV2 struct {
// contains filtered or unexported fields
}
func NewPostgresConvectiveOutlookTableV2 ¶
func NewPostgresConvectiveOutlookTableV2(db *sql.DB) PostgresConvectiveOutlookTableV2
func (*PostgresConvectiveOutlookTableV2) Insert ¶
func (p *PostgresConvectiveOutlookTableV2) Insert(outlooks []data_structures.ConvectiveOutlookV2) error
func (*PostgresConvectiveOutlookTableV2) Select ¶
func (p *PostgresConvectiveOutlookTableV2) Select(issuedTime time.Time, outlookType golang.ConvectiveOutlookType) ([]data_structures.ConvectiveOutlookV2, error)
func (*PostgresConvectiveOutlookTableV2) SelectAllLatest ¶
func (p *PostgresConvectiveOutlookTableV2) SelectAllLatest() (map[golang.ConvectiveOutlookType][]data_structures.ConvectiveOutlookV2, error)
func (*PostgresConvectiveOutlookTableV2) SelectAllLatestByLocation ¶
func (p *PostgresConvectiveOutlookTableV2) SelectAllLatestByLocation(point geojson_v2.Point) ([]data_structures.ConvectiveOutlookV2, error)
func (*PostgresConvectiveOutlookTableV2) SelectById ¶
func (p *PostgresConvectiveOutlookTableV2) SelectById(id string) ([]data_structures.ConvectiveOutlookV2, error)
func (*PostgresConvectiveOutlookTableV2) SelectLatest ¶
func (p *PostgresConvectiveOutlookTableV2) SelectLatest(outlookType golang.ConvectiveOutlookType) ([]data_structures.ConvectiveOutlookV2, error)
type PostgresDeviceTable ¶
type PostgresDeviceTable struct {
// contains filtered or unexported fields
}
func NewPostgresDeviceTable ¶
func NewPostgresDeviceTable(db *sql.DB) PostgresDeviceTable
func (PostgresDeviceTable) Delete ¶
func (p PostgresDeviceTable) Delete(id string) error
func (PostgresDeviceTable) Insert ¶
func (p PostgresDeviceTable) Insert(device data_structures.Device) error
func (PostgresDeviceTable) Select ¶
func (p PostgresDeviceTable) Select(id string) (*data_structures.Device, error)
func (PostgresDeviceTable) SelectByUser ¶
func (p PostgresDeviceTable) SelectByUser(userId string) ([]data_structures.Device, error)
func (PostgresDeviceTable) UpdateApnsToken ¶
func (p PostgresDeviceTable) UpdateApnsToken(id, apnsToken string) error
type PostgresLocationQueries ¶
type PostgresLocationQueries struct {
// contains filtered or unexported fields
}
func NewLocationQueries ¶
func NewLocationQueries(db *sql.DB) PostgresLocationQueries
func (*PostgresLocationQueries) GetDevicesForAlertID ¶
func (n *PostgresLocationQueries) GetDevicesForAlertID(alertId string) (map[data_structures.Device][]string, error)
GetDevicesForAlertID returns a mapping from device to list of LocationNames
func (*PostgresLocationQueries) GetDevicesForConvectiveOutlookID ¶
func (n *PostgresLocationQueries) GetDevicesForConvectiveOutlookID(convectiveOutlookId string) (map[string]map[data_structures.Device][]string, error)
GetDevicesForConvectiveOutlookID returns a mapping from level to device to list of LocationNames
func (*PostgresLocationQueries) GetDevicesForMesoscaleDiscussionID ¶
func (n *PostgresLocationQueries) GetDevicesForMesoscaleDiscussionID(mesoscaleDiscussionID string) (map[data_structures.Device][]string, error)
GetDevicesForMesoscaleDiscussionID returns a mapping from device to list of LocationNames
type PostgresLocationTable ¶
type PostgresLocationTable struct {
// contains filtered or unexported fields
}
func NewPostgresLocationTable ¶
func NewPostgresLocationTable(db *sql.DB) PostgresLocationTable
func (*PostgresLocationTable) Delete ¶
func (p *PostgresLocationTable) Delete(locationID string) error
func (*PostgresLocationTable) Insert ¶
func (p *PostgresLocationTable) Insert(location data_structures.Location) error
func (*PostgresLocationTable) Select ¶
func (p *PostgresLocationTable) Select(locationID string) (*data_structures.Location, error)
func (*PostgresLocationTable) SelectByCodes ¶
func (p *PostgresLocationTable) SelectByCodes(codes []string) ([]data_structures.Location, error)
func (*PostgresLocationTable) SelectByDeviceID ¶
func (p *PostgresLocationTable) SelectByDeviceID(deviceID string) ([]data_structures.Location, error)
func (*PostgresLocationTable) SelectByUserID ¶
func (p *PostgresLocationTable) SelectByUserID(userID string) ([]data_structures.Location, error)
func (*PostgresLocationTable) SelectNotificationsWithConvectiveOutlook ¶
func (p *PostgresLocationTable) SelectNotificationsWithConvectiveOutlook() ([]data_structures.Location, error)
func (*PostgresLocationTable) SelectNotificationsWithMDNotifications ¶
func (p *PostgresLocationTable) SelectNotificationsWithMDNotifications() ([]data_structures.Location, 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 (*PostgresLocationTable) Update ¶
func (p *PostgresLocationTable) Update(location data_structures.Location) error
type PostgresMesoscaleDiscussionV2Table ¶
type PostgresMesoscaleDiscussionV2Table struct {
// contains filtered or unexported fields
}
func NewPostgresMesoscaleDiscussionV2Table ¶
func NewPostgresMesoscaleDiscussionV2Table(db *sql.DB) PostgresMesoscaleDiscussionV2Table
func (*PostgresMesoscaleDiscussionV2Table) Delete ¶
func (p *PostgresMesoscaleDiscussionV2Table) Delete(year, mdNumber int) error
func (*PostgresMesoscaleDiscussionV2Table) Insert ¶
func (p *PostgresMesoscaleDiscussionV2Table) Insert(md data_structures.MesoscaleDiscussionV2) error
func (*PostgresMesoscaleDiscussionV2Table) Select ¶
func (p *PostgresMesoscaleDiscussionV2Table) Select(year, mdNumber int) (*data_structures.MesoscaleDiscussionV2, error)
func (*PostgresMesoscaleDiscussionV2Table) SelectById ¶
func (p *PostgresMesoscaleDiscussionV2Table) SelectById(id string) (*data_structures.MesoscaleDiscussionV2, error)
func (*PostgresMesoscaleDiscussionV2Table) SelectLatest ¶
func (p *PostgresMesoscaleDiscussionV2Table) SelectLatest() ([]data_structures.MesoscaleDiscussionV2, error)
func (*PostgresMesoscaleDiscussionV2Table) SelectLatestByLocation ¶
func (p *PostgresMesoscaleDiscussionV2Table) SelectLatestByLocation(point geojson_v2.Point) ([]data_structures.MesoscaleDiscussionV2, error)
func (*PostgresMesoscaleDiscussionV2Table) SelectMDNotInTable ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.