Benenne Packages konsistent und füge go.mod und go.sum hinzu.
This commit is contained in:
parent
02cac422f4
commit
fef8224984
20 changed files with 38 additions and 34 deletions
4
.gitignore
vendored
4
.gitignore
vendored
|
@ -4,7 +4,7 @@
|
|||
*.dll
|
||||
*.so
|
||||
*.dylib
|
||||
sprechstundentool
|
||||
officeHours
|
||||
|
||||
#Databases
|
||||
*.db
|
||||
|
@ -20,5 +20,3 @@ vendor/
|
|||
|
||||
# Go workspace file
|
||||
go.work
|
||||
go.mod
|
||||
go.sum
|
||||
|
|
|
@ -13,8 +13,8 @@
|
|||
},
|
||||
"mailer": {
|
||||
"type": "Stdout",
|
||||
"fromAddress": "sprechstunden@localhost",
|
||||
"fromName": "Sprechstunden <sprechstunden@localhost>",
|
||||
"fromAddress": "officeHours@localhost",
|
||||
"fromName": "Office hours <officeHours@localhost>",
|
||||
"smtpHost": "localhost",
|
||||
"smtpPort": 25,
|
||||
"smtpUseAuth": false,
|
||||
|
@ -33,4 +33,4 @@
|
|||
"tutor": {
|
||||
"mailSuffix": ""
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,8 +5,8 @@ import (
|
|||
"log"
|
||||
"net/http"
|
||||
"net/mail"
|
||||
"sprechstundentool/config"
|
||||
"sprechstundentool/models"
|
||||
"officeHours/config"
|
||||
"officeHours/models"
|
||||
"strconv"
|
||||
"strings"
|
||||
)
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package controllers
|
||||
|
||||
import (
|
||||
"sprechstundentool/config"
|
||||
"sprechstundentool/models"
|
||||
"officeHours/config"
|
||||
"officeHours/models"
|
||||
)
|
||||
|
||||
// BaseHandler will hold everything that controller needs
|
||||
|
|
|
@ -3,7 +3,7 @@ package controllers
|
|||
|
||||
import (
|
||||
"net/http"
|
||||
"sprechstundentool/models"
|
||||
"officeHours/models"
|
||||
"strconv"
|
||||
)
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ import (
|
|||
"fmt"
|
||||
"html/template"
|
||||
"net/http"
|
||||
"sprechstundentool/models"
|
||||
"officeHours/models"
|
||||
"strconv"
|
||||
)
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ package controllers
|
|||
|
||||
import (
|
||||
"html/template"
|
||||
"sprechstundentool/models"
|
||||
"officeHours/models"
|
||||
)
|
||||
|
||||
var Templates, _ = template.Must(template.ParseFiles(
|
||||
|
|
|
@ -5,7 +5,7 @@ import (
|
|||
"bytes"
|
||||
"fmt"
|
||||
"html/template"
|
||||
"sprechstundentool/models"
|
||||
"officeHours/models"
|
||||
)
|
||||
|
||||
func (b *BaseHandler) GetTimetable(officeHours []models.OfficeHour) (timetable map[models.Date]map[int]models.OfficeHour, slots []int) {
|
||||
|
|
6
doc.go
6
doc.go
|
@ -1,6 +0,0 @@
|
|||
// sprechstundentool project doc.go
|
||||
|
||||
/*
|
||||
sprechstundentool document
|
||||
*/
|
||||
package main
|
7
go.mod
Normal file
7
go.mod
Normal file
|
@ -0,0 +1,7 @@
|
|||
module officeHours
|
||||
|
||||
go 1.18
|
||||
|
||||
require github.com/mattn/go-sqlite3 v1.14.15
|
||||
|
||||
require github.com/go-sql-driver/mysql v1.6.0
|
4
go.sum
Normal file
4
go.sum
Normal file
|
@ -0,0 +1,4 @@
|
|||
github.com/go-sql-driver/mysql v1.6.0 h1:BCTh4TKNUYmOmMUcQ3IipzF5prigylS7XXjEkfCHuOE=
|
||||
github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg=
|
||||
github.com/mattn/go-sqlite3 v1.14.15 h1:vfoHhTN1af61xCRSWzFIWzx2YskyMTwHLrExkBOjvxI=
|
||||
github.com/mattn/go-sqlite3 v1.14.15/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S2DGjv9HUNg=
|
8
main.go
8
main.go
|
@ -8,10 +8,10 @@ import (
|
|||
"log/syslog"
|
||||
"net/http"
|
||||
"os"
|
||||
"sprechstundentool/config"
|
||||
"sprechstundentool/controllers"
|
||||
"sprechstundentool/repositories"
|
||||
"sprechstundentool/sqldb"
|
||||
"officeHours/config"
|
||||
"officeHours/controllers"
|
||||
"officeHours/repositories"
|
||||
"officeHours/sqldb"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
|
|
@ -3,7 +3,7 @@ package repositories
|
|||
|
||||
import (
|
||||
"database/sql"
|
||||
"sprechstundentool/models"
|
||||
"officeHours/models"
|
||||
)
|
||||
|
||||
type CourseRepo struct {
|
||||
|
|
|
@ -4,8 +4,8 @@ package repositories
|
|||
import (
|
||||
"database/sql"
|
||||
"fmt"
|
||||
"sprechstundentool/config"
|
||||
"sprechstundentool/models"
|
||||
"officeHours/config"
|
||||
"officeHours/models"
|
||||
)
|
||||
|
||||
type OfficeHourRepo struct {
|
||||
|
|
|
@ -9,9 +9,9 @@ import (
|
|||
"log"
|
||||
"math/big"
|
||||
"net/smtp"
|
||||
"sprechstundentool/config"
|
||||
"sprechstundentool/controllers"
|
||||
"sprechstundentool/models"
|
||||
"officeHours/config"
|
||||
"officeHours/controllers"
|
||||
"officeHours/models"
|
||||
)
|
||||
|
||||
type RequestRepo struct {
|
||||
|
|
|
@ -3,7 +3,7 @@ package repositories
|
|||
|
||||
import (
|
||||
"database/sql"
|
||||
"sprechstundentool/models"
|
||||
"officeHours/models"
|
||||
)
|
||||
|
||||
type RoomRepo struct {
|
||||
|
|
|
@ -3,7 +3,7 @@ package repositories
|
|||
|
||||
import (
|
||||
"database/sql"
|
||||
"sprechstundentool/models"
|
||||
"officeHours/models"
|
||||
)
|
||||
|
||||
type TutorRepo struct {
|
||||
|
|
|
@ -4,7 +4,7 @@ import (
|
|||
"database/sql"
|
||||
"fmt"
|
||||
"log"
|
||||
"sprechstundentool/config"
|
||||
"officeHours/config"
|
||||
|
||||
_ "github.com/go-sql-driver/mysql"
|
||||
_ "github.com/mattn/go-sqlite3"
|
||||
|
|
|
@ -5,7 +5,8 @@
|
|||
{{template "head.html" .}}
|
||||
</head>
|
||||
<body>
|
||||
Du solltest eine Mail mit einem Bestätigungslink erhalten haben.
|
||||
Du solltest eine Mail mit einem Bestätigungslink erhalten haben. <br />
|
||||
Sie wurde an die Adresse geschickt, mit der die Sprechstunde angelegt wurde.
|
||||
<br />
|
||||
{{template "footer.html" .}}
|
||||
</body>
|
||||
|
|
Loading…
Reference in a new issue