aprs-dashboard

command module
v0.0.0-...-8e68653 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 11, 2015 License: GPL-2.0 Imports: 13 Imported by: 0

README

APRS Dashboard Circle CI

Service API to record and query for Automated Position Reporting System (APRS) messages.

Installation

APRS Dashboard is designed to run in a Docker container. Hopefully you've come to know and love the flexibility and ease that comes with using Docker. APRS Dashboard Docker images are available on DockerHub.

APRS messages are stored in a Redis database. The Dynamic Redis fork is used so that geo searches by latitude-longitude can be performed on Redis data. These instructions make use of a Docker image for the Dynamic Redis server.

docker pull urlgrey/dynamic-redis
docker pull urlgrey/aprs-dashboard

# Run Redis container
sudo docker run --name aprs_db -d -p 6379:6379 -v /home/skidder/git/docker-dynamic-redis/redis.conf:/usr/local/etc/redis/redis.conf urlgrey/dynamic-redis:latest redis-server /usr/local/etc/redis/redis.conf

# Run APRS Dashboard, linking it to the Redis container
sudo docker run -d --link aprs_db:db -p 3000:3000 urlgrey/aprs-dashboard:latest

Note: To limit access to the PUT API, optionally set the APRS_API_TOKENS environment variable with a comma-separated list of API tokens. Default behavior is to allow access without the use of a token.

sudo docker run -d --link aprs_db:db -e APRS_API_TOKENS="secret123" -p 3000:3000 urlgrey/aprs-dashboard:latest

API

Record an APRS Message

Send an APRS message in the following JSON format:

Field Required? Type Description
data yes string ASCII-encoded APRS message
is_ax25 yes boolean Indicates whether the message is AX.25 encoded
Sample Payload
{
    "data": "WX4GSO-9>APN382,qAR,WD4LSS:!3545.18NL07957.08W#PHG5680/R,W,85NC,NCn Mount Shepherd Piedmont Triad NC",
    "is_ax25": false
}
Example
curl -X PUT -H "Content-Type: application/json" http://127.0.0.1:3000/api/v1/message -d @examples/sample_message.json

If access is limited by API token (see "Run" section), then include an X-API-KEY header:

curl -X PUT -H "X-API-KEY: secret123" -H "Content-Type: application/json" http://127.0.0.1:3000/api/v1/message -d @examples/sample_message.json

Observe output resembling the following in the APRS Dashboard console output:

[martini] Started PUT /api/v1/message for 127.0.0.1:63695
[martini] Completed 200 OK in 297.553us
Retrieve Paginated List of Messages Sent by Callsign
Example
curl -H "Accept: application/json" http://127.0.0.1:3000/api/v1/callsign/WX4GSO-9?page=1
Response
Field Type Description
page integer Page associated with these results
number_of_pages integer Total number of pages for this callsign
total_number_of_records integer Total number of records for this callsign
total_number_of_records integer Total number of records for this callsign
records Array of APRS Message An array of APRS Messages, can be empty
APRS Message
Field Type Description
timestamp integer Unix epoch time when APRS message was received
src_callsign string Callsign that sent the message
dst_callsign string Callsign of message's intended recipient
latitude float Latitude
longitude float Longitude
includes_position boolean Indicates whether message contained location information
altitude float Altitude (meters)
speed float Speed (kilometers/hour)
course unsigned integer Direction in degrees (0-360)
weather_report Weather Report Weather data, can be null
raw_message string Raw APRS messages received by service

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Godeps
_workspace/src/github.com/awslabs/aws-sdk-go/aws
Package aws provides core functionality for making requests to AWS services.
Package aws provides core functionality for making requests to AWS services.
_workspace/src/github.com/awslabs/aws-sdk-go/aws/credentials
Package provides Credential retrieval and management The Credentials is the primary method of getting access to and managing credentials Values.
Package provides Credential retrieval and management The Credentials is the primary method of getting access to and managing credentials Values.
_workspace/src/github.com/awslabs/aws-sdk-go/service/dynamodb
Package dynamodb provides a client for Amazon DynamoDB.
Package dynamodb provides a client for Amazon DynamoDB.
_workspace/src/github.com/codegangsta/negroni
Package negroni is an idiomatic approach to web middleware in Go.
Package negroni is an idiomatic approach to web middleware in Go.
_workspace/src/github.com/garyburd/redigo/internal/redistest
Package redistest contains utilities for writing Redigo tests.
Package redistest contains utilities for writing Redigo tests.
_workspace/src/github.com/garyburd/redigo/redis
Package redis is a client for the Redis database.
Package redis is a client for the Redis database.
_workspace/src/github.com/golang/glog
Package glog implements logging analogous to the Google-internal C++ INFO/ERROR/V setup.
Package glog implements logging analogous to the Google-internal C++ INFO/ERROR/V setup.
_workspace/src/github.com/gorilla/context
Package context stores values shared during a request lifetime.
Package context stores values shared during a request lifetime.
_workspace/src/github.com/gorilla/mux
Package gorilla/mux implements a request router and dispatcher.
Package gorilla/mux implements a request router and dispatcher.
_workspace/src/github.com/mholt/binding
Package binding deserializes data from HTTP requests into a struct ready for your application to use (without reflection).
Package binding deserializes data from HTTP requests into a struct ready for your application to use (without reflection).
_workspace/src/github.com/stretchr/testify/assert
A set of comprehensive testing tools for use with the normal Go testing system.
A set of comprehensive testing tools for use with the normal Go testing system.
_workspace/src/github.com/urlgrey/golang-set
Package mapset implements a simple and generic set collection.
Package mapset implements a simple and generic set collection.
_workspace/src/github.com/vaughan0/go-ini
Package ini provides functions for parsing INI configuration files.
Package ini provides functions for parsing INI configuration files.
_workspace/src/github.com/youtube/vitess/go/acl
Package acl contains functions to enforce access control lists.
Package acl contains functions to enforce access control lists.
_workspace/src/github.com/youtube/vitess/go/cache
Package cache implements a LRU cache.
Package cache implements a LRU cache.
_workspace/src/github.com/youtube/vitess/go/pools
Package pools provides functionality to manage and reuse resources like connections.
Package pools provides functionality to manage and reuse resources like connections.
_workspace/src/github.com/youtube/vitess/go/sync2
Package sync2 provides extra functionality along the same lines as sync.
Package sync2 provides extra functionality along the same lines as sync.
_workspace/src/golang.org/x/net/context
Package context defines the Context type, which carries deadlines, cancelation signals, and other request-scoped values across API boundaries and between processes.
Package context defines the Context type, which carries deadlines, cancelation signals, and other request-scoped values across API boundaries and between processes.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL