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
|
*.dll
|
||||||
*.so
|
*.so
|
||||||
*.dylib
|
*.dylib
|
||||||
sprechstundentool
|
officeHours
|
||||||
|
|
||||||
#Databases
|
#Databases
|
||||||
*.db
|
*.db
|
||||||
|
@ -20,5 +20,3 @@ vendor/
|
||||||
|
|
||||||
# Go workspace file
|
# Go workspace file
|
||||||
go.work
|
go.work
|
||||||
go.mod
|
|
||||||
go.sum
|
|
||||||
|
|
|
@ -13,8 +13,8 @@
|
||||||
},
|
},
|
||||||
"mailer": {
|
"mailer": {
|
||||||
"type": "Stdout",
|
"type": "Stdout",
|
||||||
"fromAddress": "sprechstunden@localhost",
|
"fromAddress": "officeHours@localhost",
|
||||||
"fromName": "Sprechstunden <sprechstunden@localhost>",
|
"fromName": "Office hours <officeHours@localhost>",
|
||||||
"smtpHost": "localhost",
|
"smtpHost": "localhost",
|
||||||
"smtpPort": 25,
|
"smtpPort": 25,
|
||||||
"smtpUseAuth": false,
|
"smtpUseAuth": false,
|
||||||
|
@ -33,4 +33,4 @@
|
||||||
"tutor": {
|
"tutor": {
|
||||||
"mailSuffix": ""
|
"mailSuffix": ""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,8 +5,8 @@ import (
|
||||||
"log"
|
"log"
|
||||||
"net/http"
|
"net/http"
|
||||||
"net/mail"
|
"net/mail"
|
||||||
"sprechstundentool/config"
|
"officeHours/config"
|
||||||
"sprechstundentool/models"
|
"officeHours/models"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
package controllers
|
package controllers
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"sprechstundentool/config"
|
"officeHours/config"
|
||||||
"sprechstundentool/models"
|
"officeHours/models"
|
||||||
)
|
)
|
||||||
|
|
||||||
// BaseHandler will hold everything that controller needs
|
// BaseHandler will hold everything that controller needs
|
||||||
|
|
|
@ -3,7 +3,7 @@ package controllers
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
"sprechstundentool/models"
|
"officeHours/models"
|
||||||
"strconv"
|
"strconv"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"html/template"
|
"html/template"
|
||||||
"net/http"
|
"net/http"
|
||||||
"sprechstundentool/models"
|
"officeHours/models"
|
||||||
"strconv"
|
"strconv"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@ package controllers
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"html/template"
|
"html/template"
|
||||||
"sprechstundentool/models"
|
"officeHours/models"
|
||||||
)
|
)
|
||||||
|
|
||||||
var Templates, _ = template.Must(template.ParseFiles(
|
var Templates, _ = template.Must(template.ParseFiles(
|
||||||
|
|
|
@ -5,7 +5,7 @@ import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"fmt"
|
"fmt"
|
||||||
"html/template"
|
"html/template"
|
||||||
"sprechstundentool/models"
|
"officeHours/models"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (b *BaseHandler) GetTimetable(officeHours []models.OfficeHour) (timetable map[models.Date]map[int]models.OfficeHour, slots []int) {
|
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"
|
"log/syslog"
|
||||||
"net/http"
|
"net/http"
|
||||||
"os"
|
"os"
|
||||||
"sprechstundentool/config"
|
"officeHours/config"
|
||||||
"sprechstundentool/controllers"
|
"officeHours/controllers"
|
||||||
"sprechstundentool/repositories"
|
"officeHours/repositories"
|
||||||
"sprechstundentool/sqldb"
|
"officeHours/sqldb"
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
|
|
@ -3,7 +3,7 @@ package repositories
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"database/sql"
|
"database/sql"
|
||||||
"sprechstundentool/models"
|
"officeHours/models"
|
||||||
)
|
)
|
||||||
|
|
||||||
type CourseRepo struct {
|
type CourseRepo struct {
|
||||||
|
|
|
@ -4,8 +4,8 @@ package repositories
|
||||||
import (
|
import (
|
||||||
"database/sql"
|
"database/sql"
|
||||||
"fmt"
|
"fmt"
|
||||||
"sprechstundentool/config"
|
"officeHours/config"
|
||||||
"sprechstundentool/models"
|
"officeHours/models"
|
||||||
)
|
)
|
||||||
|
|
||||||
type OfficeHourRepo struct {
|
type OfficeHourRepo struct {
|
||||||
|
|
|
@ -9,9 +9,9 @@ import (
|
||||||
"log"
|
"log"
|
||||||
"math/big"
|
"math/big"
|
||||||
"net/smtp"
|
"net/smtp"
|
||||||
"sprechstundentool/config"
|
"officeHours/config"
|
||||||
"sprechstundentool/controllers"
|
"officeHours/controllers"
|
||||||
"sprechstundentool/models"
|
"officeHours/models"
|
||||||
)
|
)
|
||||||
|
|
||||||
type RequestRepo struct {
|
type RequestRepo struct {
|
||||||
|
|
|
@ -3,7 +3,7 @@ package repositories
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"database/sql"
|
"database/sql"
|
||||||
"sprechstundentool/models"
|
"officeHours/models"
|
||||||
)
|
)
|
||||||
|
|
||||||
type RoomRepo struct {
|
type RoomRepo struct {
|
||||||
|
|
|
@ -3,7 +3,7 @@ package repositories
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"database/sql"
|
"database/sql"
|
||||||
"sprechstundentool/models"
|
"officeHours/models"
|
||||||
)
|
)
|
||||||
|
|
||||||
type TutorRepo struct {
|
type TutorRepo struct {
|
||||||
|
|
|
@ -4,7 +4,7 @@ import (
|
||||||
"database/sql"
|
"database/sql"
|
||||||
"fmt"
|
"fmt"
|
||||||
"log"
|
"log"
|
||||||
"sprechstundentool/config"
|
"officeHours/config"
|
||||||
|
|
||||||
_ "github.com/go-sql-driver/mysql"
|
_ "github.com/go-sql-driver/mysql"
|
||||||
_ "github.com/mattn/go-sqlite3"
|
_ "github.com/mattn/go-sqlite3"
|
||||||
|
|
|
@ -5,7 +5,8 @@
|
||||||
{{template "head.html" .}}
|
{{template "head.html" .}}
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<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 />
|
<br />
|
||||||
{{template "footer.html" .}}
|
{{template "footer.html" .}}
|
||||||
</body>
|
</body>
|
||||||
|
|
Loading…
Reference in a new issue