routing

package
v0.0.0-...-fc9b4c2 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2020 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package routing has all the routing activities. It also has the static IP of the RPi client/server that triggers the experiment.

Index

Constants

This section is empty.

Variables

View Source
var Flag int

Flag int to maintain first user or last

View Source
var NumActiveUsers int
View Source
var ServerData server.Data

ServerData contains all the data in the server

URL is the IP address of the RPi in the local network.

Functions

func ActiveUsersGet

func ActiveUsersGet(w http.ResponseWriter, r *http.Request)

ActiveUsersGet does stuff

func ActiveUsersPost

func ActiveUsersPost(w http.ResponseWriter, r *http.Request)

ActiveUsers gets all users

func ExperimentComplete

func ExperimentComplete(w http.ResponseWriter, r *http.Request)

ExperimentComplete is for the RPi to tell that it is free

func ForwardToRPi

func ForwardToRPi(w http.ResponseWriter, r *http.Request)

ForwardToRPi forwards a basic test request to the RPi

func GetViews

func GetViews(w http.ResponseWriter, r *http.Request)

GetViews does

func SetupRouting

func SetupRouting(r *mux.Router) *mux.Router

SetupRouting sets up the routing for the server

func Trigger

func Trigger(w http.ResponseWriter, r *http.Request)

Trigger sends the command intended by the user of the website to the RT machine.

func TriggerGet

func TriggerGet(w http.ResponseWriter, r *http.Request)

TriggerGet does stuff

Types

type ActiveRequest

type ActiveRequest struct {
	Data int
}

type ExperimentCompleteResponse

type ExperimentCompleteResponse struct {
	IP string
}

ExperimentCompleteResponse struct

type TriggerRequest

type TriggerRequest struct {
	RequestType string
	CameraIP    string
}

TriggerRequest is the request format of the Trigger function

Jump to

Keyboard shortcuts

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