commit ce7bac761c32ae198eb1a6d62bddf6276870e80d Author: Georg Spar Date: Fri Mar 26 21:53:25 2021 +0100 v0.0.1 diff --git a/gocart/domain/domain.go b/gocart/domain/domain.go new file mode 100644 index 0000000..c8744fc --- /dev/null +++ b/gocart/domain/domain.go @@ -0,0 +1,30 @@ +package domain + +type Package struct { + Id int `json:"id"` + Name string `json:"name"` + Amount int `json:"amount"` + Price float32 `json:"price"` + IsActive bool `json:"isActive"` +} + +type Group struct { + Id int `json:"id"` + Name string `json:"name"` + BookedPackage int `json:"bookedPackage"` + BillingAddress string `json:"billingAddress"` + AuthToken string `json:"authToken"` + IsActive bool `json:"isActive"` + BillingUser int `json:"billingUser"` +} + +type User struct { + Id int `json:"id"` + Password string `json:"password"` + IsAdmin bool `json:"isAdmin"` + Username string `json:"username"` + FullName string `json:"fullName"` + Email string `json:"email"` + GroupId int `json:"groupId"` + IsActive bool `json:"isActive"` +} diff --git a/gocart/go.mod b/gocart/go.mod new file mode 100644 index 0000000..8002991 --- /dev/null +++ b/gocart/go.mod @@ -0,0 +1,5 @@ +module spargcom/gocart + +go 1.16 + +require github.com/gorilla/mux v1.8.0 // indirect diff --git a/gocart/go.sum b/gocart/go.sum new file mode 100644 index 0000000..5350288 --- /dev/null +++ b/gocart/go.sum @@ -0,0 +1,2 @@ +github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI= +github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= diff --git a/gocart/gocart.go b/gocart/gocart.go new file mode 100644 index 0000000..95befa8 --- /dev/null +++ b/gocart/gocart.go @@ -0,0 +1,14 @@ +package main + +import ( + "fmt" + "spargcom/gocart/domain" +) + +var newUser domain.User + +func main() { + newUser.Id = 1 + fmt.Println(newUser.Id) + +} diff --git a/gocart/rester/go.mod b/gocart/rester/go.mod new file mode 100644 index 0000000..2882644 --- /dev/null +++ b/gocart/rester/go.mod @@ -0,0 +1,5 @@ +module rest.go + +go 1.16 + +require github.com/gorilla/mux v1.8.0 // indirect diff --git a/gocart/rester/go.sum b/gocart/rester/go.sum new file mode 100644 index 0000000..5350288 --- /dev/null +++ b/gocart/rester/go.sum @@ -0,0 +1,2 @@ +github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI= +github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= diff --git a/gocart/rester/rest.go b/gocart/rester/rest.go new file mode 100644 index 0000000..d81d53c --- /dev/null +++ b/gocart/rester/rest.go @@ -0,0 +1,17 @@ +package main + +import ( + "net/http" + + "github.com/gorilla/mux" +) + +func main() { + r := mux.NewRouter() + r.HandleFunc("/rhabarber", rhab) + http.ListenAndServe(":8081", r) +} + +func rhab(writer http.ResponseWriter, req *http.Request) { + writer.Write([]byte("Babablub")) +} diff --git a/gocart/rester/rester.uxf b/gocart/rester/rester.uxf new file mode 100644 index 0000000..4098db5 --- /dev/null +++ b/gocart/rester/rester.uxf @@ -0,0 +1,24 @@ +10UMLUseCase41020412040Account anlegenUMLActor0174120110Kontobesitzer/adminUMLUseCase41026412040User verwaltenUMLUseCase41031412040Tunnel verwaltenUMLActor800174100140billing system +lt=- + +UMLGeneric19050570450Web-Frontend +halign=leftUMLUseCase41036412040Auswertungen +ansehenUMLUseCase41041412040Rechnungen +anzeigenUMLUseCase41014412040einloggenRelation7016035080330;10;10;50;330;60Relation8020034010010;10;320;80Relation7020036015010;10;340;130Relation7020036020010;10;340;180Relation7020036025010;10;340;230UMLActor3034460110BenutzerRelation8032034080320;60;10;60;320;10Relation8016034024010;220;320;10Relation52020034025010;230;320;10Relation52020034015010;130;320;10Relation52020034010010;80;320;10Relation5201903405010;30;320;20UMLActor790310120120Monitoring System +Relation5203403406010;40;320;10Relation5203203405010;10;320;30Relation52027034010010;10;320;80Relation52021034016010;10;320;140Relation52015034022010;10;320;200UMLGeneric190590570280CLI/Client +halign=leftUMLActor4066460110BenutzerUMLUseCase40061012040AuthentifizierenUMLUseCase40067012040Tunnel verwaltenUMLUseCase40073012040Tunnel aktivieren +deaktivierenUMLGeneric79059013040Backend/Server +valign=centerRelation7062035010010;80;330;10Relation5106003005010;30;280;10Relation706703505010;30;330;20Relation51060030011010;90;280;10UMLGeneric80050270450Backend/Server +halign=leftRelation706903508010;10;330;60Relation51060030017010;150;280;10UMLGeneric147060340410Backend/Server +halign=leftUMLActor129084100140billing system +lt=- + +UMLUseCase160011012040Rechnung +erzeugenRelation13501002705010;20;250;30UMLUseCase160017012040Rechnung +exportierenRelation135011027010010;10;250;80UMLActor1280220120120Monitoring System +UMLUseCase160024012040Auswertung +erzeugenRelation13502402704010;20;250;20UMLActor1290350100120System Admin +UMLUseCase160036012040Accounts +verwaltenUMLUseCase160041012040Accounts +sperrenRelation13403602804010;20;260;20Relation13403702808010;10;260;60Relation134025028015010;130;260;10UMLUseCase160029012040Alarm +versendenRelation13502502708010;10;250;60UMLUseCase4108012040Paket wählenRelation709036014010;120;340;10Relation5209034014010;10;320;120 \ No newline at end of file