findmydevice

command module
v0.0.0-...-03e5f52 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2014 License: MPL-2.0 Imports: 17 Imported by: 0

README

Find My Device (fmd)

This server is still under development.

Note: The most stable version of this server is the master branch. "dev" is marked as default to prevent accidental pushes to the master branch.

Server API Reference Documentation

Prerequisites:

You will need:

How to install:

  1. Run ./install.bash (will generate "./FindMyDevice")
  • For Production level installs, you will need to also run: grunt build in the ./static/ library. This will create a ./static/dist/ directory containing prebuilt items.
  1. Copy config-example.ini to config.ini
  2. Modify config.ini to reflect your system and preferences.

Running:

GOPATH needs to be set to the root install directory. e.g.

./runserver.bash

Managing your database

The FindMyDevice binary exposes 3 arguments to manage your schema changes.

--ddlcreate "change description" --ddlupgrade --ddldowngrade "SHA revision" --ddllog

All DDL changes are kept in subdirectories under sql/patches with a SHA1 hash and the change description in the directory name.

Each patch directory contains : - upgrade.sql - downgrade.sql.orig (optional) - prev.txt - description.txt

Any other files are ignored.

The upgrade.sql script is used for processing version upgrades of the DDL.

A downgrade.sql.orig file is added to the patch directory, if you do not rename it to downgrade.sql, no downgrade is defined downgrades will halt at this version.

prev.txt keeps track of the previous version that this patch is a child of. This prevents merging of multiple branches where simultaneous branches may cause multiple head database versions. In the case of multiple heads, an upgrade will abort.

description.txt includes the comment which is passed to --ddlcreate

Adding a new dependency

# Checkout project into proper workspace
export GOPATH=~/FindMyDevice-workspace
git clone git@github.com:mozilla-services/FindMyDevice.git $GOPATH/src/github.com/mozilla-services/FindMyDevice

cd $GOPATH/src/github.com/mozilla-services/FindMyDevice

# Restore current deps to workspace
godep restore

# Add your new dep
go get github.com/mozilla-services/heka/client

# Save deps
godep save ./...

Then, commit Godeps.json and Godeps/_workspace/src/github.com/mozilla-services/heka/.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Godeps
_workspace/src/code.google.com/p/go-uuid/uuid
The uuid package generates and inspects UUIDs.
The uuid package generates and inspects UUIDs.
_workspace/src/code.google.com/p/go.net/websocket
Package websocket implements a client and server for the WebSocket protocol as specified in RFC 6455.
Package websocket implements a client and server for the WebSocket protocol as specified in RFC 6455.
_workspace/src/code.google.com/p/goprotobuf/proto
Package proto converts data structures to and from the wire format of protocol buffers.
Package proto converts data structures to and from the wire format of protocol buffers.
_workspace/src/github.com/cactus/go-statsd-client/statsd
Package statsd provides a StatsD client implementation that is safe for concurrent use by multiple goroutines and for efficiency can be created and reused.
Package statsd provides a StatsD client implementation that is safe for concurrent use by multiple goroutines and for efficiency can be created and reused.
_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/securecookie
Package gorilla/securecookie encodes and decodes authenticated and optionally encrypted cookie values.
Package gorilla/securecookie encodes and decodes authenticated and optionally encrypted cookie values.
_workspace/src/github.com/gorilla/sessions
Package gorilla/sessions provides cookie and filesystem sessions and infrastructure for custom session backends.
Package gorilla/sessions provides cookie and filesystem sessions and infrastructure for custom session backends.
_workspace/src/github.com/jessevdk/go-flags
Package flags provides an extensive command line option parser.
Package flags provides an extensive command line option parser.
_workspace/src/github.com/lib/pq
Package pq is a pure Go Postgres driver for the database/sql package.
Package pq is a pure Go Postgres driver for the database/sql package.
_workspace/src/github.com/lib/pq/listen_example
Below you will find a self-contained Go program which uses the LISTEN / NOTIFY mechanism to avoid polling the database while waiting for more work to arrive.
Below you will find a self-contained Go program which uses the LISTEN / NOTIFY mechanism to avoid polling the database while waiting for more work to arrive.
_workspace/src/github.com/lib/pq/oid
Package oid contains OID constants as defined by the Postgres server.
Package oid contains OID constants as defined by the Postgres server.
_workspace/src/github.com/mozilla-services/heka/client
Client package to talk to heka from Go.
Client package to talk to heka from Go.
Internal message representation.
wmf
storage
This file manages schema modification.
This file manages schema modification.

Jump to

Keyboard shortcuts

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