Documentation
¶
Index ¶
- Variables
- func RxSpotListDays(limit int, offset int)
- type DbObj
- type Js8callEvent
- type Js8callEventParams
- type RigPttWsEvent
- type RigStatusWsEvent
- type RxPacketFilter
- type RxPacketFilterFreq
- type RxPacketObj
- type RxSpotObj
- type StationInfoObj
- type StationInfoWsEvent
- type TxFrameObj
- type User
- type WebsocketEvent
- type WebsocketMessage
Constants ¶
This section is empty.
Variables ¶
View Source
var ( MODE_JS8 = "js8" EVENT_TYPE_RX_ACTIVITY = "RX.ACTIVITY" EVENT_TYPE_RX_DIRECTED = "RX.DIRECTED" EVENT_TYPE_RX_DIRECTED_ME = "RX.DIRECTED.ME" EVENT_TYPE_RX_SPOT = "RX.SPOT" EVENT_TYPE_RIG_PTT = "RIG.PTT" EVENT_TYPE_TX_FRAME = "TX.FRAME" EVENT_TYPE_RIG_STATUS = "RIG.STATUS" EVENT_TYPE_STATION_STATUS = "STATION.STATUS" EVENT_TYPE_STATION_INFO = "STATION.INFO" EVENT_TYPE_STATION_CALLSIGN = "STATION.CALLSIGN" EVENT_TYPE_STATION_GRID = "STATION.GRID" // event types as seen in Websocket communication WS_EVENT_TYPE_RIG_PTT = "RIG.PTT" WS_EVENT_TYPE_RIG_STATUS = "RIG.STATUS" WS_EVENT_TYPE_STATION_INFO = "STATION.INFO" WS_OBJ_TYPE_RX_PACKET = "RX.PACKET" WS_OBJ_TYPE_RX_SPOT = "RX.SPOT" WS_OBJ_TYPE_TX_FRAME = "TX.FRAME" WS_OBJ_TYPE_OTHER = "OTHER" )
View Source
var ( SQL_RX_PACKET_INSERT = "" /* 225-byte string literal not displayed */ SQL_RX_PACKET_LIST_AFTER = "" /* 332-byte string literal not displayed */ SQL_RX_PACKET_LIST_BEFORE = "" /* 367-byte string literal not displayed */ )
View Source
var ( SQL_RX_SPOT_INSERT = "" /* 126-byte string literal not displayed */ SQL_RX_SPOT_LIST_DAYS = "SELECT date(`TIMESTAMP`) FROM `RX_SPOT` ORDER BY date(`TIMESTAMP`) LIMIT ? OFFSET ?" )
View Source
var ( SQL_STATION_INFO_INSERT = "INSERT INTO `STATION_INFO` (`TIMESTAMP`, `LATEST`, `CALL`, `GRID`, `INFO`, `STATUS`) values(?, ?, ?, ?, ?, ?)" SQL_STATION_INFO_UPDATE_LATEST = "UPDATE `STATION_INFO` SET `LATEST` = 0 WHERE `LATEST` = 1 AND `ID` != ?" SQL_STATION_INFO_FETCH_LATEST = "SELECT * FROM `STATION_INFO` WHERE `LATEST` = 1" )
View Source
var ( DEFAULT_ADMIN_USERNAME = "admin" DEFAULT_ADMIN_PASSWORD = "admin" ROLE_ADMIN = "admin" ROLE_MONITOR = "monitor" ROLE_OPERATOR = "operator" )
View Source
var DefaultAdminUser = User{ Name: DEFAULT_ADMIN_USERNAME, Password: calcHash(DEFAULT_ADMIN_PASSWORD), Role: ROLE_ADMIN, }
View Source
var (
SQL_TX_FRAME_INSERT = "" /* 145-byte string literal not displayed */
)
Functions ¶
func RxSpotListDays ¶
Types ¶
type Js8callEvent ¶
type Js8callEvent struct { Type string `json:"type"` Value string `json:"value"` Params Js8callEventParams `json:"params"` DataType string Data interface{} }
type Js8callEventParams ¶
type Js8callEventParams struct { Id interface{} `json:"_ID"` Dial uint32 `json:"DIAL"` Freq uint32 `json:"FREQ"` Offset uint16 `json:"OFFSET"` Snr int16 `json:"SNR"` Speed int `json:"SPEED"` TimeDrift float32 `json:"TDRIFT"` Grid string `json:"GRID"` From string `json:"FROM"` Call string `json:"CALL"` To string `json:"TO"` Text string `json:"TEXT"` Command string `json:"CMD"` Extra string `json:"EXTRA"` PTT bool `json:"PTT"` Tones []int `json:"TONES"` UTC int64 `json:"UTC"` Selected string `json:"SELECTED"` Band string `json:"BAND"` Mode string `json:"MODE"` Submode string `json:"SUBMODE"` RptSent string `json:"RPT.SENT"` RptRecv string `json:"RPT.RECV"` }
type RigPttWsEvent ¶
type RigPttWsEvent struct {
Enabled bool
}
func CreateRigPttWsEvent ¶
func CreateRigPttWsEvent(event *Js8callEvent) (*RigPttWsEvent, error)
func (*RigPttWsEvent) WsType ¶
func (o *RigPttWsEvent) WsType() string
type RigStatusWsEvent ¶
type RigStatusWsEvent struct { Dial uint32 Freq uint32 Offset uint16 Channel uint16 Speed string Selected string }
func CreateRigStatusWsEvent ¶
func CreateRigStatusWsEvent(event *Js8callEvent) (*RigStatusWsEvent, error)
func (*RigStatusWsEvent) WsType ¶
func (o *RigStatusWsEvent) WsType() string
type RxPacketFilter ¶
type RxPacketFilter struct { Callsign string Freq RxPacketFilterFreq }
type RxPacketFilterFreq ¶
type RxPacketObj ¶
type RxPacketObj struct { Id int64 Timestamp time.Time Type string Dial uint32 Channel uint16 Freq uint32 Offset uint16 Snr int16 Mode string Speed string TimeDrift int16 Grid string From string To string Text string Command string Extra string }
func CreateRxPacketObj ¶
func CreateRxPacketObj(event *Js8callEvent) (*RxPacketObj, error)
func FetchRxPacketList ¶
func FetchRxPacketList(db *sql.DB, filter *RxPacketFilter, startTime time.Time, direction string) ([]RxPacketObj, error)
func (*RxPacketObj) WsType ¶
func (o *RxPacketObj) WsType() string
type RxSpotObj ¶
type RxSpotObj struct { Id int64 Timestamp time.Time Call string Grid string Snr int16 Channel uint16 Dial uint32 Freq uint32 Offset uint16 }
func CreateRxSpotObj ¶
func CreateRxSpotObj(event *Js8callEvent) (*RxSpotObj, error)
type StationInfoObj ¶
type StationInfoObj struct { Id int64 Timestamp string Latest bool StationInfoWsEvent }
func CreateStationInfoObj ¶
func CreateStationInfoObj(stationInfo StationInfoWsEvent) *StationInfoObj
func FetchLatestStationInfo ¶
func FetchLatestStationInfo(db *sql.DB) (StationInfoObj, error)
type StationInfoWsEvent ¶
func (*StationInfoWsEvent) UpdateFromEvent ¶
func (o *StationInfoWsEvent) UpdateFromEvent(event *Js8callEvent) error
func (*StationInfoWsEvent) WsType ¶
func (o *StationInfoWsEvent) WsType() string
type TxFrameObj ¶
type TxFrameObj struct { Id int64 Timestamp time.Time Channel uint16 Dial uint32 Freq uint32 Offset uint16 Mode string Speed string Selected string Tones []int }
func CreateTxFrameObj ¶
func CreateTxFrameObj(event *Js8callEvent) (*TxFrameObj, error)
func (*TxFrameObj) ApplyRigStatus ¶
func (obj *TxFrameObj) ApplyRigStatus(rig *RigStatusWsEvent)
func (*TxFrameObj) WsType ¶
func (o *TxFrameObj) WsType() string
type WebsocketEvent ¶
type WebsocketEvent interface {
WsType() string
}
type WebsocketMessage ¶
Click to show internal directories.
Click to hide internal directories.