Categorygithub.com/deeper-x/goship
repository
0.2.15
Repository: https://github.com/deeper-x/goship.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# README

<html>
<head>
    <meta http-equiv="Content-type" content="text/html;charset=UTF-8">
    <title>WIP - goship</title>
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css" integrity="sha384-9eLZqc9ds8eNjO3TmqPeYcDj8n+Qfa4nuSiGYa6DjLNcv9BtN69ZIulL9+8CqC9Y" crossorigin="anonymous">
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/Microsoft/vscode/extensions/markdown-language-features/media/markdown.css">
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/Microsoft/vscode/extensions/markdown-language-features/media/highlight.css">
    <link href="https://cdn.jsdelivr.net/npm/katex-copytex@latest/dist/katex-copytex.min.css" rel="stylesheet" type="text/css">
    <style>

.task-list-item { list-style-type: none; } .task-list-item-checkbox { margin-left: -20px; vertical-align: middle; } body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe WPC', 'Segoe UI', 'Ubuntu', 'Droid Sans', sans-serif; font-size: 14px; line-height: 1.6; }

    <script src="https://cdn.jsdelivr.net/npm/katex-copytex@latest/dist/katex-copytex.min.js"></script>
</head>
<body>
    <h1 id="wip---goship">WIP - goship</h1>

Note: calls marked w/ *PC are available (because are "Porting Complete")

A - LIVE DATA SERVICES:

  1. Active trips:
http://<REMOTE_IP>:8000/activeTripsNow?id_portinformer=<id_portinformer>
  1. At roadstead [*PC]:
http://<REMOTE_IP>:8000/anchored/<id_portinformer>
  1. Moored [*PC]:
http://<REMOTE_IP>:8000/moored/<id_portinformer>
  1. Arrivals now [*PC]:
http://<REMOTE_IP>:8000/arrivals/<id_portinformer>
  1. Departures now:
http://<REMOTE_IP>:8000/departuresNow?id_portinformer=<id_portinformer>
  1. Arrival previsions:
http://<REMOTE_IP>:8000/arrivalPrevisionsNow?id_portinformer=<id_portinformer>
  1. Shipped goods:
http://<REMOTE_IP>:8000/shippedGoodsNow?id_portinformer=<id_portinformer>
  1. RO/RO + RO/PAX:
http://<REMOTE_IP>:8000/trafficListNow?id_portinformer=<id_portinformer>

B - ARCHIVE DATA SERVICES:

  1. Trips archive [global recap, one row per trip]:
http://<REMOTE_IP>:8000/tripsArchive?id_portinformer=<ID_PORTINFORMER>
  1. Trips archive [global recap, one row per commercial operation]:
http://<REMOTE_IP>:8000/tripsArchiveMultiRows?id_portinformer=<ID_PORTINFORMER>
  1. Trip data archive [shipreport core]:
http://<REMOTE_IP>:8000/shipReportList?id_portinformer=<ID_PORTINFORMER>
  1. Trip data archive detailed [shipreport]:
http://<REMOTE_IP>:8000/shipReportDetails?id_portinformer=<ID_PORTINFORMER>
  1. Arrivals archive:
http://<REMOTE_IP>:8000/arrivalsArchive?id_portinformer=<id_portinformer>
  1. Departures archive:
http://<REMOTE_IP>:8000/departuresArchive?id_portinformer=<id_portinformer>
  1. Shipped goods archive:
http://<REMOTE_IP>:8000/shippedGoodsArchive?id_portinformer=<id_portinformer>
  1. Traffic list archive:
http://<REMOTE_IP>:8000/trafficListArchive?id_portinformer=<id_portinformer>

C - DAILY REGISTER SERVICES:

  1. Arrivals:
http://<REMOTE_IP>:8000/registerArrivals?id_portinformer=<ID_PORTINFORMER>
  1. Moored:
http://<REMOTE_IP>:8000/registerMoored?id_portinformer=<ID_PORTINFORMER>
  1. Roadstead:
http://<REMOTE_IP>:8000/registerRoadstead?id_portinformer=<ID_PORTINFORMER>
  1. Departures:
http://<REMOTE_IP>:8000/registerDepartures?id_portinformer=<ID_PORTINFORMER>
  1. Shiftings:
http://<REMOTE_IP>:8000/registerShiftings?id_portinformer=<ID_PORTINFORMER>
  1. Arrival previsions:
http://<REMOTE_IP>:8000/registerPlannedArrivals?id_portinformer=<ID_PORTINFORMER>
  1. Shipped goods:
http://<REMOTE_IP>:8000/registerShippedGoods?id_portinformer=<ID_PORTINFORMER>
  1. RO/RO + RO/PAX:
http://<REMOTE_IP>:8000/registerTrafficList?id_portinformer=<ID_PORTINFORMER>

D - BUSINESS INTELLIGENCE SERVICES:

  1. Shiftings/maneuverings [per quay/berth]:
http://<REMOTE_IP>:8000/tripsManeuverings?id_portinformer=<ID_PORTINFORMER>
  1. Shipped goods recap:
http://<REMOTE_IP>:8000/shippedGoodsRecap?id_portinformer=<ID_PORTINFORMER>
  1. RO/RO + RO/PAX recap:
http://<REMOTE_IP>:8000/trafficListRecap?id_portinformer=<ID_PORTINFORMER>

E - METEO DATA

  1. Meteo data archive:
http://<REMOTE_IP>:8000/meteoArchive?id_portinformer=<ID_PORTINFORMER>

Install and (first) run

# Install Go 1.11.9 and verify version # ref. https://golang.org/doc/install?download=go1.11.9.linux-386.tar.gz $ go version go version go1.11.9 linux/386

Get goship and deploy

$ go get github.com/deeper-x/goship

Pass vars at runtime or add to .bash_profile

$ export PATH=${PATH}:/usr/local/go/bin/ # FIX w/ your installation path $ export GOPATH=${HOME}/go $ export GOBIN=${GOPATH}/bin $ export PATH=${PATH}:${GOBIN} $ cd ${GOPATH}/src/github.com/deeper-x/goship $ go get -d ./...
$ go install src/goship.go $ goship # RUN FOR TEST Now listening on: http://localhost:8000 Application started. Press CTRL+C to shut down.

Close test instance

$ <CTRL+C>

Systemd configuration

# Service install instructions: # This is a service file template you can start from $ sudo cat > /usr/lib/systemd/system/goship.service <<HEREDOC

[Unit] Description=Shipreporting service middleware Documentation=https://github.com/deeper-x/goship After=network.target

[Service] Type=simple User=<YOUR_USER> WorkingDirectory=<YOUR_GOPATH>/bin/ ExecStart=<YOUR_GOBIN>/goship Restart=on-failure

[Install] WantedBy=multi-user.target

HEREDOC

</body>
</html>