Refactoring, Bugfix & Updates

+ Refactored all imports
+ Fixed a bug for the logging regarding removing \n \t \r
+ Updated to current MGO release
+ Changed the name of ICCC
This commit is contained in:
Thorsten Sommer committed 2014-10-19 19:19:11 +02:00
1 parent b50066ef5d
commit f33f7b5c29
91 files changed
+496 -316

No files matched your search

+3 -1
View File
@@ -1,6 +1,8 @@
package DeviceDatabase
import "github.com/SommerEngineering/Ocean/Log"
import (
"github.com/SommerEngineering/Ocean/Log"
)
func ActivateLoggingDevice() {
Log.AddLoggingDevice(Database{})
+7 -5
View File
@@ -1,10 +1,12 @@
package DeviceDatabase
import "strconv"
import "fmt"
import "github.com/SommerEngineering/Ocean/ConfigurationDB"
import "github.com/SommerEngineering/Ocean/Log"
import LM "github.com/SommerEngineering/Ocean/Log/Meta"
import (
"fmt"
"github.com/SommerEngineering/Ocean/ConfigurationDB"
"github.com/SommerEngineering/Ocean/Log"
LM "github.com/SommerEngineering/Ocean/Log/Meta"
"strconv"
)
func init() {
+6 -4
View File
@@ -1,9 +1,11 @@
package DeviceDatabase
import "labix.org/v2/mgo"
import "github.com/SommerEngineering/Ocean/ConfigurationDB"
import "github.com/SommerEngineering/Ocean/Log"
import LM "github.com/SommerEngineering/Ocean/Log/Meta"
import (
"github.com/SommerEngineering/Ocean/ConfigurationDB"
"github.com/SommerEngineering/Ocean/Log"
LM "github.com/SommerEngineering/Ocean/Log/Meta"
"gopkg.in/mgo.v2"
)
func initDatabase() {
+4 -2
View File
@@ -1,7 +1,9 @@
package DeviceDatabase
import "time"
import "github.com/SommerEngineering/Ocean/Shutdown"
import (
"github.com/SommerEngineering/Ocean/Shutdown"
"time"
)
// Case: The cache is full
func cacheFull() {
+3 -1
View File
@@ -1,6 +1,8 @@
package DeviceDatabase
import "github.com/SommerEngineering/Ocean/Log/Meta"
import (
"github.com/SommerEngineering/Ocean/Log/Meta"
)
type Database struct {
}
+3 -1
View File
@@ -1,6 +1,8 @@
package DeviceDatabase
import "time"
import (
"time"
)
type LogDBEntry struct {
TimeUTC time.Time `bson:"TimeUTC"`
+5 -3
View File
@@ -1,8 +1,10 @@
package DeviceDatabase
import "sync"
import "labix.org/v2/mgo"
import LM "github.com/SommerEngineering/Ocean/Log/Meta"
import (
LM "github.com/SommerEngineering/Ocean/Log/Meta"
"gopkg.in/mgo.v2"
"sync"
)
var (
senderName LM.Sender = `System::Logger::Database`
+3 -1
View File
@@ -1,6 +1,8 @@
package DeviceDatabase
import "github.com/SommerEngineering/Ocean/Log/Meta"
import (
"github.com/SommerEngineering/Ocean/Log/Meta"
)
func write2Cache(entries []Meta.Entry) {
for _, entry := range entries {