From af82d99c0b128bfe031722c82d23e67c6bbe29a7 Mon Sep 17 00:00:00 2001
From: Martin Iversen <Martin>
Date: Thu, 19 May 2022 21:59:38 +0200
Subject: [PATCH] Commenting code before release

---
 api/apiTools/basicTools.go     | 6 ++++++
 api/apiTools/errorHandling.go  | 2 +-
 api/cmd/main.go                | 2 +-
 api/database/databaseSetup.go  | 5 +++++
 api/endpoints/APIHandler.go    | 2 +-
 api/endpoints/gateway.go       | 5 +++++
 api/endpoints/homePage.go      | 6 ++++++
 api/endpoints/profiles.go      | 2 +-
 api/endpoints/projectTools.go  | 2 +-
 api/endpoints/projects.go      | 2 +-
 api/endpoints/scaffolding.go   | 2 +-
 api/endpoints/trackingTools.go | 4 ++--
 api/mqtt/mqttBroker.go         | 6 ++++++
 13 files changed, 37 insertions(+), 9 deletions(-)

diff --git a/api/apiTools/basicTools.go b/api/apiTools/basicTools.go
index 3e470af..eea2434 100644
--- a/api/apiTools/basicTools.go
+++ b/api/apiTools/basicTools.go
@@ -9,6 +9,12 @@ import (
 	"strings"
 )
 
+/*
+Class basicTools contains functions for assisting API endpoints
+Last update 19.05.2022 Martin Ivesren
+@version 1.0
+*/
+
 func CreatePath(segments []string) string {
 	var finalPath string
 	for _, s := range segments {
diff --git a/api/apiTools/errorHandling.go b/api/apiTools/errorHandling.go
index 1e395b2..57e5e77 100644
--- a/api/apiTools/errorHandling.go
+++ b/api/apiTools/errorHandling.go
@@ -10,7 +10,7 @@ Code inspired by:
 	Page authored by Matt Silverlock from questionable serviecs
 	Last visit: 08.03.2022
 
-version 0.1
+version 1.0
 Last edited 08.03.2022 by Martin Iversen
 */
 
diff --git a/api/cmd/main.go b/api/cmd/main.go
index 833f940..0f76360 100644
--- a/api/cmd/main.go
+++ b/api/cmd/main.go
@@ -9,7 +9,7 @@ import (
 /**
 Class main
 Will run the api
-Version 0.1
+Version 1.0
 Last update 08.03.2022 Martin Iversen
 */
 
diff --git a/api/database/databaseSetup.go b/api/database/databaseSetup.go
index 6587417..d3cac49 100644
--- a/api/database/databaseSetup.go
+++ b/api/database/databaseSetup.go
@@ -11,6 +11,11 @@ import (
 	"path/filepath"
 )
 
+/*
+Class databaseSetup.go created for communicating with database
+Last update 19.05.2022
+@version 1.0
+*/
 // Ctx Initializing the context to be used with firebase
 var Ctx context.Context
 
diff --git a/api/endpoints/APIHandler.go b/api/endpoints/APIHandler.go
index c4e41ad..8e19854 100644
--- a/api/endpoints/APIHandler.go
+++ b/api/endpoints/APIHandler.go
@@ -13,7 +13,7 @@ Class APIHandler.go
 Class forwards requests to the appropriate endpoint and assigns the port of the program
 Last modified by martiiv@stud.ntnu.no
 Date: 06.04.2022
-Version 0.8
+Version 1.0
 */
 var (
 	InfoLogger     *log.Logger
diff --git a/api/endpoints/gateway.go b/api/endpoints/gateway.go
index e68964f..ad3e615 100644
--- a/api/endpoints/gateway.go
+++ b/api/endpoints/gateway.go
@@ -16,6 +16,11 @@ import (
 	"strconv"
 )
 
+/**
+Class gateway.go created for managing gateways
+@version 1.0
+Last edit 19.05.2022
+*/
 var gatewayCollection *firestore.CollectionRef
 var projectCollection *firestore.DocumentRef
 
diff --git a/api/endpoints/homePage.go b/api/endpoints/homePage.go
index b760538..15f5360 100644
--- a/api/endpoints/homePage.go
+++ b/api/endpoints/homePage.go
@@ -6,6 +6,12 @@ import (
 	tool "stillasTracker/api/apiTools"
 )
 
+/**
+Class homepage.go created but never used,
+@version 1.0
+last edit 19.05.2022
+*/
+
 func homePage(w http.ResponseWriter, r *http.Request) {
 	w.Header().Set("Content-Type", "application/json")
 	w.Header().Set("Access-Control-Allow-Origin", "*")
diff --git a/api/endpoints/profiles.go b/api/endpoints/profiles.go
index a83d8da..90d147a 100644
--- a/api/endpoints/profiles.go
+++ b/api/endpoints/profiles.go
@@ -20,7 +20,7 @@ import (
 /**
 Class profiles
 This class will contain all data formatting and modification regarding the users of the system
-Version 0.9
+Version 1.0
 Last modified Martin Iversen 07.04.2022
 TODO Maybe modularize som functionality the marshall, unmarshall encode routine is repeated often
 */
diff --git a/api/endpoints/projectTools.go b/api/endpoints/projectTools.go
index 143998d..fd806bf 100644
--- a/api/endpoints/projectTools.go
+++ b/api/endpoints/projectTools.go
@@ -17,7 +17,7 @@ import (
 /*
 projectTools File contains tools used in the projects.go file
 Last edited Martin Iversen 07.04.2022
-Version 0.9
+Version 1.0
 TODO Delete checkProjectBody? It isn't used
 */
 
diff --git a/api/endpoints/projects.go b/api/endpoints/projects.go
index 148ac30..be59a88 100644
--- a/api/endpoints/projects.go
+++ b/api/endpoints/projects.go
@@ -22,7 +22,7 @@ import (
 Class projects
 This class will contain all data formatting and handling of the clients projects
 Class contains the following functions:
-Version 0.9
+Version 1.0
 Last modified Martin Iversen 07.04.2022
 TODO Find alternative for strings.Title since the function is deprecated
 TODO If possible modularize the unmarshalling and encoding of lists since there is a lot of duplicate code doing this
diff --git a/api/endpoints/scaffolding.go b/api/endpoints/scaffolding.go
index 14e368c..cf8bcce 100644
--- a/api/endpoints/scaffolding.go
+++ b/api/endpoints/scaffolding.go
@@ -15,7 +15,7 @@ import (
 /**
 Class scaffolding
 This class will contain all functions used for the handling of scaffolding units
-Version 0.9
+Version 1.0
 Last modified Martin Iversen 07.04.2022
 TODO make type non case sensitive
 */
diff --git a/api/endpoints/trackingTools.go b/api/endpoints/trackingTools.go
index 8bf36de..efe31b7 100644
--- a/api/endpoints/trackingTools.go
+++ b/api/endpoints/trackingTools.go
@@ -24,8 +24,8 @@ Class gateway
 The class wil handle all information regarding the cellular gateways in the system
 The class will contain the following functions:
 
-Version 0.1
-Last modified Martin Iversen
+Version 1.0
+Last modified Martin Iversen 19.05.2022
 */
 func UpdatePosition(w http.ResponseWriter, r *http.Request) {
 	w.Header().Set("Content-Type", "application/json")
diff --git a/api/mqtt/mqttBroker.go b/api/mqtt/mqttBroker.go
index b9a0e61..226e541 100644
--- a/api/mqtt/mqttBroker.go
+++ b/api/mqtt/mqttBroker.go
@@ -10,6 +10,12 @@ import (
 	"strings"
 )
 
+/**
+Class mqttBroker.go created for implementing an mqtt broker
+This functionality was never implemented fully given time constraints
+@version 0.5
+last edited Martin Iversen 19.05.2022
+*/
 type AdvPacket struct {
 	msg    *igs.Message
 	packet *ibs.Payload
-- 
GitLab