Update import paths
This commit is contained in:
@@ -6,13 +6,13 @@ import (
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
httpHelpers "synlotto-website/helpers/http"
|
||||
securityHelpers "synlotto-website/helpers/security"
|
||||
templateHelpers "synlotto-website/helpers/template"
|
||||
httpHelpers "synlotto-website/internal/helpers/http"
|
||||
securityHelpers "synlotto-website/internal/helpers/security"
|
||||
templateHelpers "synlotto-website/internal/helpers/template"
|
||||
|
||||
"synlotto-website/logging"
|
||||
"synlotto-website/models"
|
||||
"synlotto-website/storage"
|
||||
"synlotto-website/internal/logging"
|
||||
"synlotto-website/internal/models"
|
||||
"synlotto-website/internal/storage"
|
||||
|
||||
"github.com/gorilla/csrf"
|
||||
)
|
||||
|
||||
@@ -5,10 +5,10 @@ import (
|
||||
"log"
|
||||
"net/http"
|
||||
|
||||
templateHelpers "synlotto-website/helpers/template"
|
||||
templateHelpers "synlotto-website/internal/helpers/template"
|
||||
|
||||
"synlotto-website/middleware"
|
||||
"synlotto-website/models"
|
||||
"synlotto-website/internal/http/middleware"
|
||||
"synlotto-website/internal/models"
|
||||
)
|
||||
|
||||
type AdminLogEntry struct {
|
||||
|
||||
@@ -5,12 +5,12 @@ import (
|
||||
"log"
|
||||
"net/http"
|
||||
|
||||
httpHelpers "synlotto-website/helpers/http"
|
||||
securityHelpers "synlotto-website/helpers/security"
|
||||
templateHelpers "synlotto-website/helpers/template"
|
||||
httpHelpers "synlotto-website/internal/helpers/http"
|
||||
securityHelpers "synlotto-website/internal/helpers/security"
|
||||
templateHelpers "synlotto-website/internal/helpers/template"
|
||||
|
||||
"synlotto-website/models"
|
||||
"synlotto-website/storage"
|
||||
"synlotto-website/internal/models"
|
||||
"synlotto-website/internal/storage"
|
||||
)
|
||||
|
||||
var (
|
||||
|
||||
@@ -5,10 +5,10 @@ import (
|
||||
"log"
|
||||
"net/http"
|
||||
|
||||
httpHelpers "synlotto-website/helpers/http"
|
||||
templateHelpers "synlotto-website/helpers/template"
|
||||
httpHelpers "synlotto-website/internal/helpers/http"
|
||||
templateHelpers "synlotto-website/internal/helpers/template"
|
||||
|
||||
"synlotto-website/models"
|
||||
"synlotto-website/internal/models"
|
||||
)
|
||||
|
||||
func NewDrawHandler(db *sql.DB) http.HandlerFunc {
|
||||
|
||||
@@ -8,10 +8,10 @@ import (
|
||||
"net/url"
|
||||
"strconv"
|
||||
|
||||
templateHelpers "synlotto-website/helpers/template"
|
||||
templateHelpers "synlotto-website/internal/helpers/template"
|
||||
services "synlotto-website/services/tickets"
|
||||
|
||||
"synlotto-website/models"
|
||||
"synlotto-website/internal/models"
|
||||
)
|
||||
|
||||
func AdminTriggersHandler(db *sql.DB) http.HandlerFunc {
|
||||
|
||||
@@ -6,10 +6,10 @@ import (
|
||||
"net/http"
|
||||
"strconv"
|
||||
|
||||
httpHelpers "synlotto-website/helpers/http"
|
||||
templateHelpers "synlotto-website/helpers/template"
|
||||
httpHelpers "synlotto-website/internal/helpers/http"
|
||||
templateHelpers "synlotto-website/internal/helpers/template"
|
||||
|
||||
"synlotto-website/models"
|
||||
"synlotto-website/internal/models"
|
||||
)
|
||||
|
||||
func AddPrizesHandler(db *sql.DB) http.HandlerFunc {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package handlers
|
||||
|
||||
import (
|
||||
"synlotto-website/models"
|
||||
"synlotto-website/internal/models"
|
||||
)
|
||||
|
||||
var Draws []models.ThunderballResult
|
||||
|
||||
@@ -5,8 +5,8 @@ import (
|
||||
"log"
|
||||
"net/http"
|
||||
|
||||
templateHandlers "synlotto-website/handlers/template"
|
||||
templateHelpers "synlotto-website/helpers/template"
|
||||
templateHandlers "synlotto-website/internal/handlers/template"
|
||||
templateHelpers "synlotto-website/internal/helpers/template"
|
||||
)
|
||||
|
||||
func Home(db *sql.DB) http.HandlerFunc {
|
||||
|
||||
@@ -5,11 +5,11 @@ import (
|
||||
"log"
|
||||
"net/http"
|
||||
|
||||
templateHelpers "synlotto-website/helpers/template"
|
||||
templateHelpers "synlotto-website/internal/helpers/template"
|
||||
|
||||
"synlotto-website/helpers"
|
||||
"synlotto-website/models"
|
||||
"synlotto-website/storage"
|
||||
"synlotto-website/internal/helpers"
|
||||
"synlotto-website/internal/models"
|
||||
"synlotto-website/internal/storage"
|
||||
)
|
||||
|
||||
func NewDraw(db *sql.DB) http.HandlerFunc {
|
||||
|
||||
@@ -6,13 +6,13 @@ import (
|
||||
"log"
|
||||
"net/http"
|
||||
|
||||
templateHandlers "synlotto-website/handlers/template"
|
||||
securityHelpers "synlotto-website/helpers/security"
|
||||
templateHelpers "synlotto-website/helpers/template"
|
||||
templateHandlers "synlotto-website/internal/handlers/template"
|
||||
securityHelpers "synlotto-website/internal/helpers/security"
|
||||
templateHelpers "synlotto-website/internal/helpers/template"
|
||||
|
||||
"synlotto-website/helpers"
|
||||
"synlotto-website/models"
|
||||
"synlotto-website/storage"
|
||||
"synlotto-website/internal/helpers"
|
||||
"synlotto-website/internal/models"
|
||||
"synlotto-website/internal/storage"
|
||||
)
|
||||
|
||||
func CreateSyndicateHandler(db *sql.DB) http.HandlerFunc {
|
||||
|
||||
@@ -7,12 +7,12 @@ import (
|
||||
"strconv"
|
||||
"time"
|
||||
|
||||
templateHandlers "synlotto-website/handlers/template"
|
||||
securityHelpers "synlotto-website/helpers/security"
|
||||
templateHelpers "synlotto-website/helpers/template"
|
||||
templateHandlers "synlotto-website/internal/handlers/template"
|
||||
securityHelpers "synlotto-website/internal/helpers/security"
|
||||
templateHelpers "synlotto-website/internal/helpers/template"
|
||||
|
||||
"synlotto-website/helpers"
|
||||
"synlotto-website/storage"
|
||||
"synlotto-website/internal/helpers"
|
||||
"synlotto-website/internal/storage"
|
||||
)
|
||||
|
||||
func SyndicateInviteHandler(db *sql.DB) http.HandlerFunc {
|
||||
|
||||
@@ -10,13 +10,13 @@ import (
|
||||
"strconv"
|
||||
"time"
|
||||
|
||||
httpHelpers "synlotto-website/helpers/http"
|
||||
securityHelpers "synlotto-website/helpers/security"
|
||||
templateHelpers "synlotto-website/helpers/template"
|
||||
httpHelpers "synlotto-website/internal/helpers/http"
|
||||
securityHelpers "synlotto-website/internal/helpers/security"
|
||||
templateHelpers "synlotto-website/internal/helpers/template"
|
||||
draws "synlotto-website/services/draws"
|
||||
|
||||
"synlotto-website/helpers"
|
||||
"synlotto-website/models"
|
||||
"synlotto-website/internal/helpers"
|
||||
"synlotto-website/internal/models"
|
||||
|
||||
"github.com/gorilla/csrf"
|
||||
)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package handlers
|
||||
|
||||
import (
|
||||
"synlotto-website/models"
|
||||
"synlotto-website/internal/models"
|
||||
)
|
||||
|
||||
func MatchTicketToDraw(ticket models.MatchTicket, draw models.DrawResult, rules []models.PrizeRule) models.MatchResult {
|
||||
|
||||
@@ -5,13 +5,13 @@ import (
|
||||
"log"
|
||||
"net/http"
|
||||
|
||||
templateHandlers "synlotto-website/handlers/template"
|
||||
"synlotto-website/helpers"
|
||||
httpHelpers "synlotto-website/helpers/http"
|
||||
securityHelpers "synlotto-website/helpers/security"
|
||||
templateHelpers "synlotto-website/helpers/template"
|
||||
templateHandlers "synlotto-website/internal/handlers/template"
|
||||
"synlotto-website/internal/helpers"
|
||||
httpHelpers "synlotto-website/internal/helpers/http"
|
||||
securityHelpers "synlotto-website/internal/helpers/security"
|
||||
templateHelpers "synlotto-website/internal/helpers/template"
|
||||
|
||||
"synlotto-website/storage"
|
||||
"synlotto-website/internal/storage"
|
||||
)
|
||||
|
||||
func MessagesInboxHandler(db *sql.DB) http.HandlerFunc {
|
||||
|
||||
@@ -6,11 +6,11 @@ import (
|
||||
"net/http"
|
||||
"strconv"
|
||||
|
||||
templateHandlers "synlotto-website/handlers/template"
|
||||
httpHelpers "synlotto-website/helpers/http"
|
||||
templateHelpers "synlotto-website/helpers/template"
|
||||
templateHandlers "synlotto-website/internal/handlers/template"
|
||||
httpHelpers "synlotto-website/internal/helpers/http"
|
||||
templateHelpers "synlotto-website/internal/helpers/template"
|
||||
|
||||
"synlotto-website/storage"
|
||||
"synlotto-website/internal/storage"
|
||||
)
|
||||
|
||||
func NotificationsHandler(db *sql.DB) http.HandlerFunc {
|
||||
|
||||
@@ -9,11 +9,11 @@ import (
|
||||
"sort"
|
||||
"strconv"
|
||||
|
||||
templateHelpers "synlotto-website/helpers/template"
|
||||
templateHelpers "synlotto-website/internal/helpers/template"
|
||||
|
||||
"synlotto-website/helpers"
|
||||
"synlotto-website/middleware"
|
||||
"synlotto-website/models"
|
||||
"synlotto-website/internal/helpers"
|
||||
"synlotto-website/internal/http/middleware"
|
||||
"synlotto-website/internal/models"
|
||||
)
|
||||
|
||||
func ResultsThunderball(db *sql.DB) http.HandlerFunc {
|
||||
|
||||
@@ -6,10 +6,10 @@ import (
|
||||
"net"
|
||||
"net/http"
|
||||
|
||||
templateHandlers "synlotto-website/handlers/template"
|
||||
templateHelpers "synlotto-website/helpers/template"
|
||||
templateHandlers "synlotto-website/internal/handlers/template"
|
||||
templateHelpers "synlotto-website/internal/helpers/template"
|
||||
|
||||
"synlotto-website/middleware"
|
||||
"synlotto-website/internal/http/middleware"
|
||||
)
|
||||
|
||||
func StatisticsThunderball(db *sql.DB) http.HandlerFunc {
|
||||
|
||||
@@ -5,10 +5,10 @@ import (
|
||||
"log"
|
||||
"net/http"
|
||||
|
||||
httpHelper "synlotto-website/helpers/http"
|
||||
httpHelper "synlotto-website/internal/helpers/http"
|
||||
|
||||
"synlotto-website/models"
|
||||
"synlotto-website/storage"
|
||||
"synlotto-website/internal/models"
|
||||
"synlotto-website/internal/storage"
|
||||
)
|
||||
|
||||
func BuildTemplateData(db *sql.DB, w http.ResponseWriter, r *http.Request) models.TemplateData {
|
||||
|
||||
@@ -2,7 +2,7 @@ package helpers
|
||||
|
||||
import (
|
||||
"database/sql"
|
||||
"synlotto-website/models"
|
||||
"synlotto-website/internal/models"
|
||||
)
|
||||
|
||||
func BuildBallsSlice(t models.Ticket) []int {
|
||||
|
||||
@@ -4,9 +4,9 @@ import (
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
session "synlotto-website/handlers/session"
|
||||
session "synlotto-website/internal/handlers/session"
|
||||
|
||||
"synlotto-website/constants"
|
||||
"synlotto-website/internal/platform/constants"
|
||||
|
||||
"github.com/gorilla/sessions"
|
||||
)
|
||||
|
||||
@@ -3,7 +3,7 @@ package security
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
httpHelpers "synlotto-website/helpers/http"
|
||||
httpHelpers "synlotto-website/internal/helpers/http"
|
||||
)
|
||||
|
||||
func GetCurrentUserID(r *http.Request) (int, bool) {
|
||||
|
||||
@@ -8,8 +8,8 @@ import (
|
||||
"time"
|
||||
|
||||
"synlotto-website/config"
|
||||
helpers "synlotto-website/helpers/http"
|
||||
"synlotto-website/models"
|
||||
helpers "synlotto-website/internal/helpers/http"
|
||||
"synlotto-website/internal/models"
|
||||
|
||||
"github.com/gorilla/csrf"
|
||||
)
|
||||
|
||||
@@ -6,7 +6,7 @@ import (
|
||||
"net/http"
|
||||
"os"
|
||||
|
||||
"synlotto-website/models"
|
||||
"synlotto-website/internal/models"
|
||||
)
|
||||
|
||||
func RenderError(w http.ResponseWriter, r *http.Request, statusCode int) {
|
||||
|
||||
@@ -4,9 +4,9 @@ import (
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
httpHelpers "synlotto-website/helpers/http"
|
||||
httpHelpers "synlotto-website/internal/helpers/http"
|
||||
|
||||
"synlotto-website/constants"
|
||||
"synlotto-website/internal/platform/constants"
|
||||
)
|
||||
|
||||
func Auth(required bool) func(http.HandlerFunc) http.HandlerFunc {
|
||||
|
||||
@@ -5,7 +5,7 @@ import (
|
||||
"net/http"
|
||||
"runtime/debug"
|
||||
|
||||
templateHelpers "synlotto-website/helpers/template"
|
||||
templateHelpers "synlotto-website/internal/helpers/template"
|
||||
)
|
||||
|
||||
func Recover(next http.Handler) http.Handler {
|
||||
|
||||
@@ -5,9 +5,9 @@ import (
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
session "synlotto-website/handlers/session"
|
||||
session "synlotto-website/internal/handlers/session"
|
||||
|
||||
"synlotto-website/constants"
|
||||
"synlotto-website/internal/platform/constants"
|
||||
)
|
||||
|
||||
func SessionTimeout(next http.HandlerFunc) http.HandlerFunc {
|
||||
|
||||
@@ -4,11 +4,11 @@ import (
|
||||
"database/sql"
|
||||
"net/http"
|
||||
|
||||
accountHandlers "synlotto-website/handlers/account"
|
||||
lotteryDrawHandlers "synlotto-website/handlers/lottery/tickets"
|
||||
accountHandlers "synlotto-website/internal/handlers/account"
|
||||
lotteryDrawHandlers "synlotto-website/internal/handlers/lottery/tickets"
|
||||
|
||||
"synlotto-website/handlers"
|
||||
"synlotto-website/middleware"
|
||||
"synlotto-website/internal/handlers"
|
||||
"synlotto-website/internal/http/middleware"
|
||||
)
|
||||
|
||||
func SetupAccountRoutes(mux *http.ServeMux, db *sql.DB) {
|
||||
|
||||
@@ -4,8 +4,8 @@ import (
|
||||
"database/sql"
|
||||
"net/http"
|
||||
|
||||
admin "synlotto-website/handlers/admin"
|
||||
"synlotto-website/middleware"
|
||||
admin "synlotto-website/internal/handlers/admin"
|
||||
"synlotto-website/internal/http/middleware"
|
||||
)
|
||||
|
||||
func SetupAdminRoutes(mux *http.ServeMux, db *sql.DB) {
|
||||
|
||||
@@ -4,7 +4,7 @@ import (
|
||||
"database/sql"
|
||||
"net/http"
|
||||
|
||||
"synlotto-website/handlers"
|
||||
"synlotto-website/internal/handlers"
|
||||
)
|
||||
|
||||
func SetupResultRoutes(mux *http.ServeMux, db *sql.DB) {
|
||||
|
||||
@@ -4,8 +4,8 @@ import (
|
||||
"database/sql"
|
||||
"net/http"
|
||||
|
||||
handlers "synlotto-website/handlers/statistics"
|
||||
"synlotto-website/middleware"
|
||||
handlers "synlotto-website/internal/handlers/statistics"
|
||||
"synlotto-website/internal/http/middleware"
|
||||
)
|
||||
|
||||
func SetupStatisticsRoutes(mux *http.ServeMux, db *sql.DB) {
|
||||
|
||||
@@ -4,9 +4,9 @@ import (
|
||||
"database/sql"
|
||||
"net/http"
|
||||
|
||||
lotterySyndicateHandlers "synlotto-website/handlers/lottery/syndicate"
|
||||
lotterySyndicateHandlers "synlotto-website/internal/handlers/lottery/syndicate"
|
||||
|
||||
"synlotto-website/middleware"
|
||||
"synlotto-website/internal/http/middleware"
|
||||
)
|
||||
|
||||
func SetupSyndicateRoutes(mux *http.ServeMux, db *sql.DB) {
|
||||
|
||||
@@ -4,7 +4,7 @@ import (
|
||||
"encoding/json"
|
||||
"log"
|
||||
|
||||
"synlotto-website/models"
|
||||
"synlotto-website/internal/models"
|
||||
)
|
||||
|
||||
func LogConfig(config *models.Config) {
|
||||
|
||||
@@ -5,7 +5,7 @@ import (
|
||||
"time"
|
||||
|
||||
internal "synlotto-website/internal/licensecheck"
|
||||
"synlotto-website/models"
|
||||
"synlotto-website/internal/models"
|
||||
)
|
||||
|
||||
var globalChecker *internal.LicenseChecker
|
||||
|
||||
@@ -5,7 +5,7 @@ import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"synlotto-website/models"
|
||||
"synlotto-website/internal/models"
|
||||
)
|
||||
|
||||
type AppState struct {
|
||||
|
||||
@@ -10,11 +10,11 @@ import (
|
||||
"os"
|
||||
"time"
|
||||
|
||||
sessionHandlers "synlotto-website/handlers/session"
|
||||
sessionHelpers "synlotto-website/helpers/session"
|
||||
sessionHandlers "synlotto-website/internal/handlers/session"
|
||||
sessionHelpers "synlotto-website/internal/helpers/session"
|
||||
|
||||
"synlotto-website/internal/models"
|
||||
"synlotto-website/logging"
|
||||
"synlotto-website/models"
|
||||
|
||||
"github.com/gorilla/sessions"
|
||||
)
|
||||
|
||||
@@ -3,7 +3,7 @@ package config
|
||||
import (
|
||||
"sync"
|
||||
|
||||
"synlotto-website/models"
|
||||
"synlotto-website/internal/models"
|
||||
)
|
||||
|
||||
var (
|
||||
|
||||
@@ -3,7 +3,7 @@ package services
|
||||
import (
|
||||
"database/sql"
|
||||
"log"
|
||||
"synlotto-website/models"
|
||||
"synlotto-website/internal/models"
|
||||
)
|
||||
|
||||
func GetDrawResultForTicket(db *sql.DB, game string, drawDate string) models.DrawResult {
|
||||
|
||||
@@ -3,8 +3,8 @@ package matcher
|
||||
import (
|
||||
"database/sql"
|
||||
"fmt"
|
||||
"synlotto-website/helpers"
|
||||
"synlotto-website/models"
|
||||
"synlotto-website/internal/helpers"
|
||||
"synlotto-website/internal/models"
|
||||
thunderballRules "synlotto-website/rules"
|
||||
)
|
||||
|
||||
|
||||
@@ -5,13 +5,13 @@ import (
|
||||
"fmt"
|
||||
"log"
|
||||
|
||||
lotteryTicketHandlers "synlotto-website/handlers/lottery/tickets"
|
||||
lotteryTicketHandlers "synlotto-website/internal/handlers/lottery/tickets"
|
||||
thunderballrules "synlotto-website/rules"
|
||||
services "synlotto-website/services/draws"
|
||||
|
||||
"synlotto-website/helpers"
|
||||
"synlotto-website/internal/helpers"
|
||||
"synlotto-website/internal/models"
|
||||
"synlotto-website/matcher"
|
||||
"synlotto-website/models"
|
||||
)
|
||||
|
||||
func RunTicketMatching(db *sql.DB, triggeredBy string) (models.MatchRunStats, error) {
|
||||
|
||||
@@ -6,11 +6,11 @@ import (
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
securityHelpers "synlotto-website/helpers/security"
|
||||
templateHelpers "synlotto-website/helpers/template"
|
||||
securityHelpers "synlotto-website/internal/helpers/security"
|
||||
templateHelpers "synlotto-website/internal/helpers/template"
|
||||
"synlotto-website/internal/logging"
|
||||
|
||||
"synlotto-website/middleware"
|
||||
"synlotto-website/internal/http/middleware"
|
||||
)
|
||||
|
||||
func AdminOnly(db *sql.DB, next http.HandlerFunc) http.HandlerFunc {
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
//Currently no delete functions, only archiving to remove from user view but they can pull them back. Consider a soft delete which hides them from being unarchived for 5 years?
|
||||
// Then systematically delete after 5 years? or delete sooner but retain backups
|
||||
// Currently no delete functions, only archiving to remove from user
|
||||
// view but they can pull them back. Consider a soft delete which hides them from being unarchived for 5 years?
|
||||
// Then systematically delete after 5 years? or delete sooner but retain backup
|
||||
@@ -6,7 +6,7 @@ import (
|
||||
"database/sql"
|
||||
"errors"
|
||||
|
||||
"synlotto-website/models"
|
||||
"synlotto-website/internal/models"
|
||||
)
|
||||
|
||||
type UsersRepo struct{ db *sql.DB}
|
||||
|
||||
@@ -4,9 +4,10 @@ import (
|
||||
"database/sql"
|
||||
"log"
|
||||
|
||||
"synlotto-website/config"
|
||||
"synlotto-website/logging"
|
||||
"synlotto-website/internal/logging"
|
||||
"synlotto-website/internal/platform/config"
|
||||
|
||||
// ToDo: remove sqlite
|
||||
_ "modernc.org/sqlite"
|
||||
)
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ package storage
|
||||
import (
|
||||
"database/sql"
|
||||
"fmt"
|
||||
"synlotto-website/models"
|
||||
"synlotto-website/internal/models"
|
||||
"time"
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user