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