Documentation ¶
Index ¶
- func CreateRouter(server *HTTPServer) (*mux.Router, error)
- type DB
- func (db *DB) AddMessage(mmsi int64, messageType int64, message []byte, raw []byte) error
- func (db *DB) AddPacket(raw string) error
- func (db *DB) GetMessageStatsByVesselForTypeJson(messageType int) ([]byte, error)
- func (db *DB) GetMessageStatsByVesselForVesselJson(mmsi int) ([]byte, error)
- func (db *DB) GetMessageStatsByVesselJson() ([]byte, error)
- func (db *DB) GetMessageStatsJson() ([]byte, error)
- func (db *DB) GetPositionsForVessel(mmsi int) ([]*Position, error)
- func (db *DB) GetPositionsForVesselGeojson(mmsi int) ([]byte, error)
- func (db *DB) GetVessel(mmsi int) (*Vessel, error)
- func (db *DB) GetVessels() ([]*Vessel, error)
- func (db *DB) GetVesselsGeojson() ([]byte, error)
- func (db *DB) Open(connectionString string) error
- func (db *DB) UpdatePosition(r nmeaais.DecoderOutput)
- func (db *DB) UpdatePositionFromPositionReportClassA(m *nmeaais.PositionReportClassA) error
- func (db *DB) UpdatePositionFromPositionReportClassBStandard(m *nmeaais.PositionReportClassBStandard) error
- func (db *DB) UpdateVessel(r nmeaais.DecoderOutput)
- func (db *DB) UpdateVesselFromPositionReportClassA(m *nmeaais.PositionReportClassA) error
- func (db *DB) UpdateVesselFromPositionReportClassBStandard(m *nmeaais.PositionReportClassBStandard) error
- func (db *DB) UpdateVesselFromStaticAndVoyageRelatedData(m *nmeaais.StaticAndVoyageRelatedData) error
- func (db *DB) UpdateVesselFromStaticDataReportA(m *nmeaais.StaticDataReportA) error
- func (db *DB) UpdateVesselFromStaticDataReportB(m *nmeaais.StaticDataReportB) error
- type HTTPServer
- func (s *HTTPServer) GetMessageStats(w http.ResponseWriter, r *http.Request, vars map[string]string) error
- func (s *HTTPServer) GetMessageStatsByVessel(w http.ResponseWriter, r *http.Request, vars map[string]string) error
- func (s *HTTPServer) GetMessageStatsByVesselForType(w http.ResponseWriter, r *http.Request, vars map[string]string) error
- func (s *HTTPServer) GetMessageStatsByVesselForVessel(w http.ResponseWriter, r *http.Request, vars map[string]string) error
- func (s *HTTPServer) GetPositionsForVessel(w http.ResponseWriter, r *http.Request, vars map[string]string) error
- func (s *HTTPServer) GetVesselByMmsi(w http.ResponseWriter, r *http.Request, vars map[string]string) error
- func (s *HTTPServer) GetVessels(w http.ResponseWriter, r *http.Request, vars map[string]string) error
- type HttpApiFunc
- type Monstah
- type Position
- type Vessel
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateRouter ¶
func CreateRouter(server *HTTPServer) (*mux.Router, error)
Types ¶
type DB ¶
func (*DB) AddMessage ¶
func (*DB) GetMessageStatsByVesselForTypeJson ¶
func (*DB) GetMessageStatsByVesselForVesselJson ¶
func (*DB) GetMessageStatsByVesselJson ¶
func (*DB) GetMessageStatsJson ¶
func (*DB) GetPositionsForVessel ¶
func (*DB) GetPositionsForVesselGeojson ¶
func (*DB) GetVessels ¶
func (*DB) GetVesselsGeojson ¶
func (*DB) UpdatePosition ¶
func (db *DB) UpdatePosition(r nmeaais.DecoderOutput)
func (*DB) UpdatePositionFromPositionReportClassA ¶
func (db *DB) UpdatePositionFromPositionReportClassA(m *nmeaais.PositionReportClassA) error
func (*DB) UpdatePositionFromPositionReportClassBStandard ¶
func (db *DB) UpdatePositionFromPositionReportClassBStandard(m *nmeaais.PositionReportClassBStandard) error
func (*DB) UpdateVessel ¶
func (db *DB) UpdateVessel(r nmeaais.DecoderOutput)
func (*DB) UpdateVesselFromPositionReportClassA ¶
func (db *DB) UpdateVesselFromPositionReportClassA(m *nmeaais.PositionReportClassA) error
func (*DB) UpdateVesselFromPositionReportClassBStandard ¶
func (db *DB) UpdateVesselFromPositionReportClassBStandard(m *nmeaais.PositionReportClassBStandard) error
func (*DB) UpdateVesselFromStaticAndVoyageRelatedData ¶
func (db *DB) UpdateVesselFromStaticAndVoyageRelatedData(m *nmeaais.StaticAndVoyageRelatedData) error
func (*DB) UpdateVesselFromStaticDataReportA ¶
func (db *DB) UpdateVesselFromStaticDataReportA(m *nmeaais.StaticDataReportA) error
func (*DB) UpdateVesselFromStaticDataReportB ¶
func (db *DB) UpdateVesselFromStaticDataReportB(m *nmeaais.StaticDataReportB) error
type HTTPServer ¶
type HTTPServer struct {
DB *DB
}
func NewHTTPServer ¶
func NewHTTPServer(db *DB) *HTTPServer
func (*HTTPServer) GetMessageStats ¶
func (s *HTTPServer) GetMessageStats(w http.ResponseWriter, r *http.Request, vars map[string]string) error
func (*HTTPServer) GetMessageStatsByVessel ¶
func (s *HTTPServer) GetMessageStatsByVessel(w http.ResponseWriter, r *http.Request, vars map[string]string) error
func (*HTTPServer) GetMessageStatsByVesselForType ¶
func (s *HTTPServer) GetMessageStatsByVesselForType(w http.ResponseWriter, r *http.Request, vars map[string]string) error
func (*HTTPServer) GetMessageStatsByVesselForVessel ¶
func (s *HTTPServer) GetMessageStatsByVesselForVessel(w http.ResponseWriter, r *http.Request, vars map[string]string) error
func (*HTTPServer) GetPositionsForVessel ¶
func (s *HTTPServer) GetPositionsForVessel(w http.ResponseWriter, r *http.Request, vars map[string]string) error
func (*HTTPServer) GetVesselByMmsi ¶
func (s *HTTPServer) GetVesselByMmsi(w http.ResponseWriter, r *http.Request, vars map[string]string) error
func (*HTTPServer) GetVessels ¶
func (s *HTTPServer) GetVessels(w http.ResponseWriter, r *http.Request, vars map[string]string) error
type HttpApiFunc ¶
type Monstah ¶
type Monstah struct { DB *DB // contains filtered or unexported fields }
func NewMonstah ¶
type Vessel ¶
type Vessel struct { MMSI int64 `json:"mmsi" db:"mmsi"` VesselName null.String `json:"vesselName" db:"vessel_name"` CallSign null.String `json:"callSign" db:"call_sign"` ShipType null.String `json:"shipType" db:"ship_type"` Length null.Int `json:"length" db:"length"` Breadth null.Int `json:"breadth" db:"breadth"` Draught null.Float `json:"draught" db:"draught"` Latitude null.Float `json:"latitude" db:"latitude"` Longitude null.Float `json:"longitude" db:"longitude"` SpeedOverGround null.Float `json:"speedOverGround" db:"speed_over_ground"` TrueHeading null.Float `json:"trueHeading" db:"true_heading"` CourseOverGround null.Float `json:"courseOverGround" db:"course_over_ground"` Destination null.String `json:"destination" db:"destination"` UpdatedAt time.Time `json:"updatedAt" db:"updated_at"` }
Click to show internal directories.
Click to hide internal directories.