findmydevice

command module
v1.4.3 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2015 License: MPL-2.0 Imports: 17 Imported by: 0

README

Find My Device (fmd)

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:

For development, you may also need:

How to install:

  1. Run make (will generate "./FindMyDevice")
  • For Production level installs, you will need to also run: make build-prod This will create a ./static/dist/ directory containing prebuild items.
  1. 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/.

Using a custom Find My Device server

For instructions on flashing your phone to use a custom Find My Device server, see Custom FMD Server.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Package util is a generated protocol buffer package.
Package util is a generated protocol buffer package.
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