about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEmile <hanemile@protonmail.com>2019-02-07 02:45:52 +0100
committerEmile <hanemile@protonmail.com>2019-02-07 02:45:52 +0100
commitbec0f65a315bb8cebe2a74035ebef37c86eb5449 (patch)
tree2e1c37eb790b350e20afca4350811e2902f83e26
parentd2d08cecf4746a53df305fb67468919ef9657836 (diff)
new model, see the wiki for a description how this all works
-rw-r--r--go.mod7
-rw-r--r--go.sum6
-rwxr-xr-xinsertdouble.sh5
-rwxr-xr-xtest.sh4
4 files changed, 22 insertions, 0 deletions
diff --git a/go.mod b/go.mod
new file mode 100644
index 0000000..f109aef
--- /dev/null
+++ b/go.mod
@@ -0,0 +1,7 @@
+module git.darknebu.la/GalaxySimulator/db-container
+
+require (
+	git.darknebu.la/GalaxySimulator/structs v0.0.0-20190205205735-9dd56b9448e5
+	github.com/gorilla/mux v1.7.0
+	github.com/lib/pq v1.0.0
+)
diff --git a/go.sum b/go.sum
new file mode 100644
index 0000000..fc772f8
--- /dev/null
+++ b/go.sum
@@ -0,0 +1,6 @@
+git.darknebu.la/GalaxySimulator/structs v0.0.0-20190205205735-9dd56b9448e5 h1:aEQHEERwdLfRJrXb867wZzRMs1ym+j0zDys3opLWPew=
+git.darknebu.la/GalaxySimulator/structs v0.0.0-20190205205735-9dd56b9448e5/go.mod h1:LSDIBBC7IcWERm4wlDAroMpsUP7zJ1yDZFlQnP/UIsQ=
+github.com/gorilla/mux v1.7.0 h1:tOSd0UKHQd6urX6ApfOn4XdBMY6Sh1MfxV3kmaazO+U=
+github.com/gorilla/mux v1.7.0/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs=
+github.com/lib/pq v1.0.0 h1:X5PMW56eZitiTeO7tKzZxFCSpbFZJtkMMooicw2us9A=
+github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
diff --git a/insertdouble.sh b/insertdouble.sh
new file mode 100755
index 0000000..a628497
--- /dev/null
+++ b/insertdouble.sh
@@ -0,0 +1,5 @@
+curl -X POST http://localhost:8081/deleteStars 
+curl -X POST http://localhost:8081/deleteNodes 
+curl -X POST --data "w=1000" http://localhost:8081/new
+curl -X POST --data "x=750&y=250&vx=0.1&vy=0.3&m=100&index=1" http://localhost:8081/insertStar
+curl -X POST --data "x=250&y=250&vx=0.1&vy=0.3&m=100&index=1" http://localhost:8081/insertStar
diff --git a/test.sh b/test.sh
new file mode 100755
index 0000000..6548ccf
--- /dev/null
+++ b/test.sh
@@ -0,0 +1,4 @@
+curl -X POST http://localhost:8081/deleteStars 
+curl -X POST http://localhost:8081/deleteNodes 
+curl -X POST --data "w=1000" http://localhost:8081/new
+curl -X POST --data "x=10&y=20&vx=0.1&vy=0.3&m=100&index=1" http://localhost:8081/insertStar