Files
beacon-server/db/sqlc/models.go
T
MrAlders0n 6bc7877a05 feat(polling): check signed readings and store the reply rssi
A reading that carries a signature is dropped when it does not verify. Unsigned readings are handled as before. Signed claims and readings with a repeated key are refused.
2026-11-28 23:13:28 -05:00

855 lines
34 KiB
Go

// Code generated by sqlc. DO NOT EDIT.
// versions:
// sqlc v1.31.1
package db
import (
"encoding/json"
"github.com/google/uuid"
"github.com/jackc/pgx/v5/pgtype"
)
type Account struct {
ID uuid.UUID `json:"id"`
Name string `json:"name"`
CreatedAt pgtype.Timestamptz `json:"created_at"`
DeactivatedAt pgtype.Timestamptz `json:"deactivated_at"`
}
type AlertOutbox struct {
ID int64 `json:"id"`
UserID uuid.UUID `json:"user_id"`
PassID uuid.UUID `json:"pass_id"`
TargetKind string `json:"target_kind"`
TargetPublicKey []byte `json:"target_public_key"`
Name string `json:"name"`
AlertKind string `json:"alert_kind"`
Value *int64 `json:"value"`
Detail string `json:"detail"`
CreatedAt pgtype.Timestamptz `json:"created_at"`
DeliveredAt pgtype.Timestamptz `json:"delivered_at"`
EmailSentAt pgtype.Timestamptz `json:"email_sent_at"`
EmailAttempts int16 `json:"email_attempts"`
EmailNextAttemptAt pgtype.Timestamptz `json:"email_next_attempt_at"`
EmailDoneAt pgtype.Timestamptz `json:"email_done_at"`
PushAttempts int16 `json:"push_attempts"`
PushNextAttemptAt pgtype.Timestamptz `json:"push_next_attempt_at"`
PushDoneAt pgtype.Timestamptz `json:"push_done_at"`
}
type AlertOutboxDevice struct {
OutboxID int64 `json:"outbox_id"`
SessionID uuid.UUID `json:"session_id"`
DeliveredAt pgtype.Timestamptz `json:"delivered_at"`
}
type AlertPass struct {
PassID uuid.UUID `json:"pass_id"`
StartedAt pgtype.Timestamptz `json:"started_at"`
FinishedAt pgtype.Timestamptz `json:"finished_at"`
}
type AnalyticsDirtyHour struct {
Hour pgtype.Timestamptz `json:"hour"`
EnqueuedAt pgtype.Timestamptz `json:"enqueued_at"`
}
type AnalyticsHourlyAdvertHearing struct {
Hour pgtype.Timestamptz `json:"hour"`
Iata string `json:"iata"`
OriginPubkey []byte `json:"origin_pubkey"`
Observations int64 `json:"observations"`
LastHeard pgtype.Timestamptz `json:"last_heard"`
Name *string `json:"name"`
NodeType *int16 `json:"node_type"`
}
type AnalyticsHourlyAdvertSet struct {
Hour pgtype.Timestamptz `json:"hour"`
OriginPubkey []byte `json:"origin_pubkey"`
Iatas []string `json:"iatas"`
AdvertPackets int64 `json:"advert_packets"`
FloodPackets int64 `json:"flood_packets"`
DirectPackets int64 `json:"direct_packets"`
}
type AnalyticsHourlyIataObservation struct {
Hour pgtype.Timestamptz `json:"hour"`
Iata string `json:"iata"`
ObservationCount int64 `json:"observation_count"`
}
type AnalyticsHourlyNodeActivity struct {
Hour pgtype.Timestamptz `json:"hour"`
OriginPubkey []byte `json:"origin_pubkey"`
Observations int64 `json:"observations"`
SnrSum *float64 `json:"snr_sum"`
SnrN int64 `json:"snr_n"`
RssiSum *int64 `json:"rssi_sum"`
RssiN int64 `json:"rssi_n"`
HopSum int64 `json:"hop_sum"`
HopN int64 `json:"hop_n"`
}
type AnalyticsHourlyObserverActivity struct {
Hour pgtype.Timestamptz `json:"hour"`
ObserverID uuid.UUID `json:"observer_id"`
PayloadType int16 `json:"payload_type"`
Observations int64 `json:"observations"`
AirtimeMs *float32 `json:"airtime_ms"`
AirtimeN int64 `json:"airtime_n"`
SnrSum *float32 `json:"snr_sum"`
SnrN int64 `json:"snr_n"`
SnrMin *float32 `json:"snr_min"`
RssiSum *int64 `json:"rssi_sum"`
RssiN int64 `json:"rssi_n"`
}
type AnalyticsHourlyObserverIdentity struct {
Hour pgtype.Timestamptz `json:"hour"`
Iata string `json:"iata"`
ObserverID uuid.UUID `json:"observer_id"`
ObservationCount int64 `json:"observation_count"`
DisplayName *string `json:"display_name"`
ObserverType *string `json:"observer_type"`
}
type AnalyticsHourlyPacketSet struct {
Hour pgtype.Timestamptz `json:"hour"`
Iatas []string `json:"iatas"`
Packets int64 `json:"packets"`
}
type AnalyticsHourlyPath struct {
Hour pgtype.Timestamptz `json:"hour"`
Iata string `json:"iata"`
Category int32 `json:"category"`
HashBytes int32 `json:"hash_bytes"`
Entries int32 `json:"entries"`
Receptions int64 `json:"receptions"`
}
type AnalyticsHourlyPayloadBreakdown struct {
Hour pgtype.Timestamptz `json:"hour"`
Iata string `json:"iata"`
PayloadType int16 `json:"payload_type"`
Count int64 `json:"count"`
}
type AnalyticsHourlyScopeNode struct {
Hour pgtype.Timestamptz `json:"hour"`
Iata string `json:"iata"`
ScopeID int32 `json:"scope_id"`
OriginPubkey []byte `json:"origin_pubkey"`
}
type AnalyticsHourlyScopeObserver struct {
Hour pgtype.Timestamptz `json:"hour"`
Iata string `json:"iata"`
ScopeID int32 `json:"scope_id"`
ObserverID uuid.UUID `json:"observer_id"`
}
type AnalyticsHourlyScopeSet struct {
Hour pgtype.Timestamptz `json:"hour"`
Iatas []string `json:"iatas"`
ScopeID int32 `json:"scope_id"`
Packets int64 `json:"packets"`
}
type AnalyticsHourlySignal struct {
Hour pgtype.Timestamptz `json:"hour"`
Iata string `json:"iata"`
Kind int32 `json:"kind"`
SnrBin int32 `json:"snr_bin"`
RssiBin int32 `json:"rssi_bin"`
Receptions int64 `json:"receptions"`
SnrSamples int64 `json:"snr_samples"`
SnrSum float64 `json:"snr_sum"`
RssiSamples int64 `json:"rssi_samples"`
RssiSum float64 `json:"rssi_sum"`
}
type AnalyticsHourlyTalkerSet struct {
Hour pgtype.Timestamptz `json:"hour"`
SenderName string `json:"sender_name"`
Iatas []string `json:"iatas"`
Messages int64 `json:"messages"`
LastSent pgtype.Timestamptz `json:"last_sent"`
}
type AnalyticsRawState struct {
Singleton bool `json:"singleton"`
RawDeletedBefore pgtype.Timestamptz `json:"raw_deleted_before"`
Coverage int64 `json:"coverage"`
}
type AnalyticsRollupHour struct {
Hour pgtype.Timestamptz `json:"hour"`
Status string `json:"status"`
RolledAt pgtype.Timestamptz `json:"rolled_at"`
ContentHash *string `json:"content_hash"`
}
type AnalyticsState struct {
Singleton bool `json:"singleton"`
Revision int64 `json:"revision"`
}
type BackgroundState struct {
Key string `json:"key"`
Value json.RawMessage `json:"value"`
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
}
type Channel struct {
ID int32 `json:"id"`
ChannelHash []byte `json:"channel_hash"`
KeyFingerprint []byte `json:"key_fingerprint"`
Name *string `json:"name"`
Hashtag *string `json:"hashtag"`
IsHashtag *bool `json:"is_hashtag"`
IsPublic *bool `json:"is_public"`
KeyKnown *bool `json:"key_known"`
FirstSeen pgtype.Timestamptz `json:"first_seen"`
LastSeen pgtype.Timestamptz `json:"last_seen"`
MessageCount int64 `json:"message_count"`
}
type ChannelConfigScope struct {
KeyFingerprint []byte `json:"key_fingerprint"`
RegionSlug *string `json:"region_slug"`
}
type ChannelIata struct {
ChannelHash []byte `json:"channel_hash"`
Iata string `json:"iata"`
LastHeard pgtype.Timestamptz `json:"last_heard"`
}
type ChannelKey struct {
ChannelID int32 `json:"channel_id"`
KeyBytes []byte `json:"key_bytes"`
KeyFingerprint []byte `json:"key_fingerprint"`
AddedAt pgtype.Timestamptz `json:"added_at"`
AddedBy *string `json:"added_by"`
}
type ChannelMessage struct {
ID int64 `json:"id"`
ChannelID int32 `json:"channel_id"`
PacketHash []byte `json:"packet_hash"`
SenderName *string `json:"sender_name"`
SenderPubkey []byte `json:"sender_pubkey"`
Content *string `json:"content"`
SentAt pgtype.Timestamptz `json:"sent_at"`
}
type ChannelMessageIata struct {
MessageID int64 `json:"message_id"`
Iata string `json:"iata"`
ChannelID int32 `json:"channel_id"`
ScopeID *int32 `json:"scope_id"`
}
type IataCode struct {
Iata string `json:"iata"`
DisplayName *string `json:"display_name"`
ApproxLat *float64 `json:"approx_lat"`
ApproxLng *float64 `json:"approx_lng"`
AddedAt pgtype.Timestamptz `json:"added_at"`
Border []byte `json:"border"`
}
type KnownRoute struct {
ID int64 `json:"id"`
PathKey []byte `json:"path_key"`
NodeIds []uuid.UUID `json:"node_ids"`
HashPrefix [][]byte `json:"hash_prefix"`
Iata string `json:"iata"`
HopCount int32 `json:"hop_count"`
FirstSeen pgtype.Timestamptz `json:"first_seen"`
LastSeen pgtype.Timestamptz `json:"last_seen"`
ObservationCount int64 `json:"observation_count"`
}
type MeshmapperChannelCatalogue struct {
Iata string `json:"iata"`
Url string `json:"url"`
Payload []byte `json:"payload"`
Etag *string `json:"etag"`
CheckedAt pgtype.Timestamptz `json:"checked_at"`
AttemptedAt pgtype.Timestamptz `json:"attempted_at"`
NextAttempt pgtype.Timestamptz `json:"next_attempt"`
LastError string `json:"last_error"`
}
type MeshmapperChannelMember struct {
Iata string `json:"iata"`
KeyFingerprint []byte `json:"key_fingerprint"`
}
type MeshmapperRepeater struct {
Source string `json:"source"`
PublicKey []byte `json:"public_key"`
Data json.RawMessage `json:"data"`
}
type MeshmapperRepeaterSource struct {
Source string `json:"source"`
Url string `json:"url"`
Etag *string `json:"etag"`
CheckedAt pgtype.Timestamptz `json:"checked_at"`
AttemptedAt pgtype.Timestamptz `json:"attempted_at"`
NextAttempt pgtype.Timestamptz `json:"next_attempt"`
LastError string `json:"last_error"`
}
type MeshmapperScopeCatalogue struct {
Iata string `json:"iata"`
Url string `json:"url"`
Payload []byte `json:"payload"`
Etag *string `json:"etag"`
CheckedAt pgtype.Timestamptz `json:"checked_at"`
AttemptedAt pgtype.Timestamptz `json:"attempted_at"`
NextAttempt pgtype.Timestamptz `json:"next_attempt"`
LastError string `json:"last_error"`
}
type MeshmapperZoneBoundary struct {
Iata string `json:"iata"`
Url string `json:"url"`
Feature []byte `json:"feature"`
Etag *string `json:"etag"`
CheckedAt pgtype.Timestamptz `json:"checked_at"`
AttemptedAt pgtype.Timestamptz `json:"attempted_at"`
NextAttempt pgtype.Timestamptz `json:"next_attempt"`
LastError string `json:"last_error"`
}
type MeshmapperZoneList struct {
Country string `json:"country"`
Payload []byte `json:"payload"`
Etag *string `json:"etag"`
FetchedAt pgtype.Timestamptz `json:"fetched_at"`
AttemptedAt pgtype.Timestamptz `json:"attempted_at"`
NextAttempt pgtype.Timestamptz `json:"next_attempt"`
LastError string `json:"last_error"`
}
type MvRadioPreset struct {
Preset string `json:"preset"`
Iata *string `json:"iata"`
SourceType string `json:"source_type"`
Count int64 `json:"count"`
}
type Node struct {
ID uuid.UUID `json:"id"`
PublicKey []byte `json:"public_key"`
NodeType int16 `json:"node_type"`
Name *string `json:"name"`
Latitude *float64 `json:"latitude"`
Longitude *float64 `json:"longitude"`
LocationSource *string `json:"location_source"`
LastAdvertAt pgtype.Timestamptz `json:"last_advert_at"`
SupportsMultibytePaths bool `json:"supports_multibyte_paths"`
SupportsMultibyteTraces bool `json:"supports_multibyte_traces"`
DefaultScopeID *int32 `json:"default_scope_id"`
MinFirmwareVersion *string `json:"min_firmware_version"`
FirstSeen pgtype.Timestamptz `json:"first_seen"`
LastSeen pgtype.Timestamptz `json:"last_seen"`
RadioFreqMhz *float32 `json:"radio_freq_mhz"`
RadioSf *int16 `json:"radio_sf"`
RadioBwKhz *float32 `json:"radio_bw_khz"`
Metadata []byte `json:"metadata"`
DeviceClockDriftSeconds *int64 `json:"device_clock_drift_seconds"`
PrevClockDriftSeconds *int64 `json:"prev_clock_drift_seconds"`
}
type NodeClockDrift struct {
NodeID uuid.UUID `json:"node_id"`
AdvertAt pgtype.Timestamptz `json:"advert_at"`
DriftSeconds int64 `json:"drift_seconds"`
}
type NodeIata struct {
NodeID uuid.UUID `json:"node_id"`
Iata string `json:"iata"`
FirstHeard pgtype.Timestamptz `json:"first_heard"`
LastHeard pgtype.Timestamptz `json:"last_heard"`
ObservationCount *int64 `json:"observation_count"`
}
type NodeNeighbor struct {
NodeID uuid.UUID `json:"node_id"`
NeighborID uuid.UUID `json:"neighbor_id"`
Iata string `json:"iata"`
FirstSeen pgtype.Timestamptz `json:"first_seen"`
LastSeen pgtype.Timestamptz `json:"last_seen"`
ObservationCount int64 `json:"observation_count"`
Snr *float32 `json:"snr"`
RegionScope *string `json:"region_scope"`
}
type NodeShortID struct {
NodeID uuid.UUID `json:"node_id"`
Iata string `json:"iata"`
Prefix4 []byte `json:"prefix_4"`
Prefix1 []byte `json:"prefix_1"`
Prefix2 []byte `json:"prefix_2"`
Prefix3 []byte `json:"prefix_3"`
}
type Observer struct {
ID uuid.UUID `json:"id"`
PublicKey []byte `json:"public_key"`
DisplayName *string `json:"display_name"`
ObserverType *string `json:"observer_type"`
SoftwareVersion *string `json:"software_version"`
HardwareModel *string `json:"hardware_model"`
FirmwareVersion *string `json:"firmware_version"`
FirmwareBuild *string `json:"firmware_build"`
RadioFreqMhz *float32 `json:"radio_freq_mhz"`
RadioSf *int16 `json:"radio_sf"`
RadioBwKhz *float32 `json:"radio_bw_khz"`
RadioCr *int16 `json:"radio_cr"`
BatteryLevel *float32 `json:"battery_level"`
UptimeSeconds *int64 `json:"uptime_seconds"`
StatusMetadata []byte `json:"status_metadata"`
LastStatusAt pgtype.Timestamptz `json:"last_status_at"`
FirstSeen pgtype.Timestamptz `json:"first_seen"`
LastSeen pgtype.Timestamptz `json:"last_seen"`
ObservationCount *int64 `json:"observation_count"`
Metadata []byte `json:"metadata"`
RegionScope *string `json:"region_scope"`
LastIata *string `json:"last_iata"`
LastIataAt pgtype.Timestamptz `json:"last_iata_at"`
}
type ObserverBroker struct {
ObserverID uuid.UUID `json:"observer_id"`
BrokerName string `json:"broker_name"`
FirstSeen pgtype.Timestamptz `json:"first_seen"`
LastSeen pgtype.Timestamptz `json:"last_seen"`
LastPacketAt pgtype.Timestamptz `json:"last_packet_at"`
AuthOk *bool `json:"auth_ok"`
}
type ObserverLocation struct {
ObserverID uuid.UUID `json:"observer_id"`
Iata *string `json:"iata"`
Latitude *float64 `json:"latitude"`
Longitude *float64 `json:"longitude"`
ReportedAt pgtype.Timestamptz `json:"reported_at"`
}
type ObserverOwner struct {
ObserverID uuid.UUID `json:"observer_id"`
OwnerNodeID pgtype.UUID `json:"owner_node_id"`
OwnerPubkey []byte `json:"owner_pubkey"`
ContactName *string `json:"contact_name"`
ContactEmail *string `json:"contact_email"`
Notes *string `json:"notes"`
Source *string `json:"source"`
AddedAt pgtype.Timestamptz `json:"added_at"`
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
}
type ObserverScope struct {
ObserverID uuid.UUID `json:"observer_id"`
ScopeID int32 `json:"scope_id"`
FirstSeen pgtype.Timestamptz `json:"first_seen"`
LastSeen pgtype.Timestamptz `json:"last_seen"`
}
type ObserverTelemetry struct {
ID int64 `json:"id"`
ObserverID uuid.UUID `json:"observer_id"`
ReportedAt pgtype.Timestamptz `json:"reported_at"`
BatteryVoltageMv *int32 `json:"battery_voltage_mv"`
AirtimeTxSecs *float32 `json:"airtime_tx_secs"`
AirtimeRxSecs *float32 `json:"airtime_rx_secs"`
NoiseFloorDb *float32 `json:"noise_floor_db"`
UptimeSeconds *int64 `json:"uptime_seconds"`
QueueLength *int32 `json:"queue_length"`
DebugFlags *int32 `json:"debug_flags"`
ReceiveErrors *int32 `json:"receive_errors"`
}
type Packet struct {
PacketHash []byte `json:"packet_hash"`
PayloadType int16 `json:"payload_type"`
PayloadVersion int16 `json:"payload_version"`
RouteType int16 `json:"route_type"`
TransportCodesPresent *bool `json:"transport_codes_present"`
RegionCode *int32 `json:"region_code"`
SubRegionCode *int32 `json:"sub_region_code"`
ScopeID *int32 `json:"scope_id"`
OriginPubkey []byte `json:"origin_pubkey"`
RawPayload []byte `json:"raw_payload"`
RawHeader []byte `json:"raw_header"`
ParsedPayload []byte `json:"parsed_payload"`
Decrypted *bool `json:"decrypted"`
ChannelHash []byte `json:"channel_hash"`
TraceTag []byte `json:"trace_tag"`
FirstHeardAt pgtype.Timestamptz `json:"first_heard_at"`
LastHeardAt pgtype.Timestamptz `json:"last_heard_at"`
ObservationCount int64 `json:"observation_count"`
Brokers []string `json:"brokers"`
}
type PacketObservation struct {
ID int64 `json:"id"`
PacketHash []byte `json:"packet_hash"`
ObserverID uuid.UUID `json:"observer_id"`
Iata string `json:"iata"`
HeardAt pgtype.Timestamptz `json:"heard_at"`
PathLengthByte int16 `json:"path_length_byte"`
HashSize int16 `json:"hash_size"`
HopCount int16 `json:"hop_count"`
PathBytes []byte `json:"path_bytes"`
Rssi *int16 `json:"rssi"`
Snr *float32 `json:"snr"`
PropagationTimeMs *int32 `json:"propagation_time_ms"`
RadioFreqMhz *float32 `json:"radio_freq_mhz"`
SpreadFactor *int16 `json:"spread_factor"`
BandwidthKhz *float32 `json:"bandwidth_khz"`
CodingRate *int16 `json:"coding_rate"`
SourceBroker *string `json:"source_broker"`
PayloadType *int16 `json:"payload_type"`
AirtimeMs *float32 `json:"airtime_ms"`
}
type PacketSite struct {
PacketHash []byte `json:"packet_hash"`
Iata string `json:"iata"`
SiteHeardAt pgtype.Timestamptz `json:"site_heard_at"`
FirstHeardAt pgtype.Timestamptz `json:"first_heard_at"`
PayloadType int16 `json:"payload_type"`
RouteType int16 `json:"route_type"`
ScopeID *int32 `json:"scope_id"`
}
type PollingAdminStop struct {
TargetPublicKey []byte `json:"target_public_key"`
ObserverPublicKey []byte `json:"observer_public_key"`
ReportedAt pgtype.Timestamptz `json:"reported_at"`
}
type PollingAssignment struct {
TargetPublicKey []byte `json:"target_public_key"`
ObserverPublicKey []byte `json:"observer_public_key"`
Rank int16 `json:"rank"`
EvidenceSnr *float32 `json:"evidence_snr"`
EvidenceCount int32 `json:"evidence_count"`
AssignedAt pgtype.Timestamptz `json:"assigned_at"`
Requested bool `json:"requested"`
}
type PollingCandidate struct {
ObserverPublicKey []byte `json:"observer_public_key"`
TargetPublicKey []byte `json:"target_public_key"`
KeyMode string `json:"key_mode"`
ClaimedSnr *float32 `json:"claimed_snr"`
Requested bool `json:"requested"`
State string `json:"state"`
Misses int16 `json:"misses"`
LastAttempt pgtype.Timestamptz `json:"last_attempt"`
LastOk pgtype.Timestamptz `json:"last_ok"`
}
type PollingClaim struct {
ObserverPublicKey []byte `json:"observer_public_key"`
ObserverID uuid.UUID `json:"observer_id"`
Origin string `json:"origin"`
Client string `json:"client"`
PolicyVersion string `json:"policy_version"`
Community bool `json:"community"`
AcceptsRequests bool `json:"accepts_requests"`
RequestSlots int16 `json:"request_slots"`
ClaimedAt pgtype.Timestamptz `json:"claimed_at"`
ReceivedAt pgtype.Timestamptz `json:"received_at"`
MaxSlots *int16 `json:"max_slots"`
PollInterval *int32 `json:"poll_interval"`
PollHost string `json:"poll_host"`
Signed bool `json:"signed"`
ClaimPolicy string `json:"claim_policy"`
}
type PollingForeignClaim struct {
ObserverPublicKey []byte `json:"observer_public_key"`
ObserverID uuid.UUID `json:"observer_id"`
Client string `json:"client"`
PollHost string `json:"poll_host"`
Signed bool `json:"signed"`
ClaimedAt pgtype.Timestamptz `json:"claimed_at"`
ReceivedAt pgtype.Timestamptz `json:"received_at"`
}
type PollingForeignTarget struct {
ObserverPublicKey []byte `json:"observer_public_key"`
TargetPublicKey []byte `json:"target_public_key"`
State string `json:"state"`
Misses int16 `json:"misses"`
}
type PollingObserver struct {
ObserverPublicKey []byte `json:"observer_public_key"`
Blocked bool `json:"blocked"`
Approved bool `json:"approved"`
Note string `json:"note"`
}
type PollingOtherState struct {
TargetPublicKey []byte `json:"target_public_key"`
ObserverPublicKey []byte `json:"observer_public_key"`
SeenAt pgtype.Timestamptz `json:"seen_at"`
}
type PollingServedVersion struct {
TargetPublicKey []byte `json:"target_public_key"`
ObserverPublicKey []byte `json:"observer_public_key"`
Ver int64 `json:"ver"`
ServedAt pgtype.Timestamptz `json:"served_at"`
}
type PollingState struct {
ID bool `json:"id"`
Paused bool `json:"paused"`
PausedUntil pgtype.Timestamptz `json:"paused_until"`
ExcludedNodes [][]byte `json:"excluded_nodes"`
}
type PollingTarget struct {
TargetPublicKey []byte `json:"target_public_key"`
ActiveRequestID pgtype.UUID `json:"active_request_id"`
Ver int64 `json:"ver"`
VerChangedAt pgtype.Timestamptz `json:"ver_changed_at"`
NoPasswordBlocked bool `json:"no_password_blocked"`
}
type PortalState struct {
CookieHash []byte `json:"cookie_hash"`
StateHash []byte `json:"state_hash"`
Verifier string `json:"verifier"`
ReturnPath string `json:"return_path"`
ExpiresAt pgtype.Timestamptz `json:"expires_at"`
}
type ReconfirmAmb struct {
Iata string `json:"iata"`
Len int32 `json:"len"`
Prefix []byte `json:"prefix"`
}
type Region struct {
ID int32 `json:"id"`
Slug string `json:"slug"`
Name string `json:"name"`
Description *string `json:"description"`
DisplayOrder *int32 `json:"display_order"`
CenterLat *float64 `json:"center_lat"`
CenterLng *float64 `json:"center_lng"`
ZoomLevel *int32 `json:"zoom_level"`
CreatedAt pgtype.Timestamptz `json:"created_at"`
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
Imported bool `json:"imported"`
}
type RegionIata struct {
RegionID int32 `json:"region_id"`
Iata string `json:"iata"`
AddedAt pgtype.Timestamptz `json:"added_at"`
}
type RepeaterReading struct {
ID int64 `json:"id"`
TargetPublicKey []byte `json:"target_public_key"`
ObserverPublicKey []byte `json:"observer_public_key"`
ObserverID pgtype.UUID `json:"observer_id"`
SampledAt pgtype.Timestamptz `json:"sampled_at"`
ReceivedAt pgtype.Timestamptz `json:"received_at"`
Method string `json:"method"`
Tag int64 `json:"tag"`
BatteryMv *int32 `json:"battery_mv"`
TemperatureC *float32 `json:"temperature_c"`
PollSnr *float32 `json:"poll_snr"`
UptimeSecs *int64 `json:"uptime_secs"`
PacketsRecv *int64 `json:"packets_recv"`
PacketsSent *int64 `json:"packets_sent"`
RecvFlood *int64 `json:"recv_flood"`
RecvDirect *int64 `json:"recv_direct"`
SentFlood *int64 `json:"sent_flood"`
SentDirect *int64 `json:"sent_direct"`
TxAirSecs *int64 `json:"tx_air_secs"`
RxAirSecs *int64 `json:"rx_air_secs"`
RecvErrors *int64 `json:"recv_errors"`
NoiseFloor *int32 `json:"noise_floor"`
LastRssi *int32 `json:"last_rssi"`
TxQueue *int32 `json:"tx_queue"`
FloodDups *int32 `json:"flood_dups"`
DirectDups *int32 `json:"direct_dups"`
ErrEvents *int32 `json:"err_events"`
LastSnr *float32 `json:"last_snr"`
Lpp []byte `json:"lpp"`
PacketHash []byte `json:"packet_hash"`
Corroborated *int16 `json:"corroborated"`
Client string `json:"client"`
Trusted bool `json:"trusted"`
ForeignSource bool `json:"foreign_source"`
PollRssi *int16 `json:"poll_rssi"`
Signed bool `json:"signed"`
}
type RollupOb struct {
PacketHash []byte `json:"packet_hash"`
ObserverID uuid.UUID `json:"observer_id"`
Iata string `json:"iata"`
HeardAt pgtype.Timestamptz `json:"heard_at"`
PathLengthByte int16 `json:"path_length_byte"`
HashSize int16 `json:"hash_size"`
HopCount int16 `json:"hop_count"`
PathLen int32 `json:"path_len"`
Rssi *int16 `json:"rssi"`
Snr *float32 `json:"snr"`
AirtimeMs *float32 `json:"airtime_ms"`
PayloadType *int16 `json:"payload_type"`
RouteType int16 `json:"route_type"`
OriginPubkey []byte `json:"origin_pubkey"`
ScopeID *int32 `json:"scope_id"`
}
type TelemetryRequest struct {
ID uuid.UUID `json:"id"`
UserID uuid.UUID `json:"user_id"`
TargetPublicKey []byte `json:"target_public_key"`
Status string `json:"status"`
StatusReason string `json:"status_reason"`
PasswordCt []byte `json:"password_ct"`
PasswordNonce []byte `json:"password_nonce"`
PasswordFailed bool `json:"password_failed"`
CreatedAt pgtype.Timestamptz `json:"created_at"`
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
EnabledAt pgtype.Timestamptz `json:"enabled_at"`
AttentionStatus *string `json:"attention_status"`
}
type TraceIata struct {
TraceTag []byte `json:"trace_tag"`
Iata string `json:"iata"`
LastHeard pgtype.Timestamptz `json:"last_heard"`
}
type TraceTag struct {
TraceTag []byte `json:"trace_tag"`
FirstHeardAt pgtype.Timestamptz `json:"first_heard_at"`
LastHeardAt pgtype.Timestamptz `json:"last_heard_at"`
PacketCount int64 `json:"packet_count"`
TraceType *string `json:"trace_type"`
ScopeID *int32 `json:"scope_id"`
BestPayload []byte `json:"best_payload"`
BestPathLen int32 `json:"best_path_len"`
Heard bool `json:"heard"`
}
type TransportScope struct {
ID int32 `json:"id"`
Name string `json:"name"`
DisplayName *string `json:"display_name"`
TransportKey []byte `json:"transport_key"`
KeyFingerprint []byte `json:"key_fingerprint"`
CreatedAt pgtype.Timestamptz `json:"created_at"`
ImportedOnly bool `json:"imported_only"`
}
type User struct {
ID uuid.UUID `json:"id"`
Username string `json:"username"`
DisplayName string `json:"display_name"`
Email string `json:"email"`
PendingEmail *string `json:"pending_email"`
PassHash string `json:"pass_hash"`
EmailVerifiedAt pgtype.Timestamptz `json:"email_verified_at"`
Provider string `json:"provider"`
ProviderSubject *string `json:"provider_subject"`
CreatedAt pgtype.Timestamptz `json:"created_at"`
LastLoginAt pgtype.Timestamptz `json:"last_login_at"`
DisabledAt pgtype.Timestamptz `json:"disabled_at"`
AlertEmail bool `json:"alert_email"`
AlertPush bool `json:"alert_push"`
}
type UserAlertRule struct {
ID uuid.UUID `json:"id"`
UserID uuid.UUID `json:"user_id"`
TargetKind string `json:"target_kind"`
TargetPublicKey []byte `json:"target_public_key"`
Kind string `json:"kind"`
Threshold *int32 `json:"threshold"`
ThresholdHigh *int32 `json:"threshold_high"`
Enabled bool `json:"enabled"`
State string `json:"state"`
StateChangedAt pgtype.Timestamptz `json:"state_changed_at"`
LastSentAt pgtype.Timestamptz `json:"last_sent_at"`
CursorAt pgtype.Timestamptz `json:"cursor_at"`
Streak int16 `json:"streak"`
RecoveredAt pgtype.Timestamptz `json:"recovered_at"`
Version int64 `json:"version"`
CreatedAt pgtype.Timestamptz `json:"created_at"`
}
type UserAtla struct {
UserID uuid.UUID `json:"user_id"`
Range string `json:"range"`
Revision int64 `json:"revision"`
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
}
type UserAtlasPin struct {
UserID uuid.UUID `json:"user_id"`
Position int16 `json:"position"`
Kind string `json:"kind"`
PublicKey []byte `json:"public_key"`
Name string `json:"name"`
Tiles []string `json:"tiles"`
View *string `json:"view"`
TelemetryTiles []string `json:"telemetry_tiles"`
}
type UserDevice struct {
SessionID uuid.UUID `json:"session_id"`
UserID uuid.UUID `json:"user_id"`
Platform string `json:"platform"`
PushToken string `json:"push_token"`
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
PayloadKey []byte `json:"payload_key"`
}
type UserSession struct {
ID uuid.UUID `json:"id"`
UserID uuid.UUID `json:"user_id"`
TokenHash []byte `json:"token_hash"`
Kind string `json:"kind"`
Label string `json:"label"`
CreatedAt pgtype.Timestamptz `json:"created_at"`
LastUsedAt pgtype.Timestamptz `json:"last_used_at"`
ExpiresAt pgtype.Timestamptz `json:"expires_at"`
HardExpiresAt pgtype.Timestamptz `json:"hard_expires_at"`
EndedAt pgtype.Timestamptz `json:"ended_at"`
Ip string `json:"ip"`
UserAgent string `json:"user_agent"`
}
type UserToken struct {
TokenHash []byte `json:"token_hash"`
UserID uuid.UUID `json:"user_id"`
Kind string `json:"kind"`
Data []byte `json:"data"`
CreatedAt pgtype.Timestamptz `json:"created_at"`
ExpiresAt pgtype.Timestamptz `json:"expires_at"`
UsedAt pgtype.Timestamptz `json:"used_at"`
}