Core separation #13

Merged
Teajey merged 11 commits from core-separation into main 2025-06-27 01:14:19 +12:00
44 changed files with 39 additions and 39 deletions
Showing only changes of commit d89b855299 - Show all commits

2
.gitignore vendored
View File

@ -2,5 +2,5 @@
gin-bin gin-bin
*lishwist.db *lishwist.db
.env*.local .env*.local
server/api/db/init_sql.go http/api/db/init_sql.go
.ignored/ .ignored/

View File

@ -2,4 +2,4 @@ go 1.23
toolchain go1.23.3 toolchain go1.23.3
use ./server use ./http

View File

@ -5,7 +5,7 @@ package db
import ( import (
"database/sql" "database/sql"
"fmt" "fmt"
"lishwist/env" "lishwist/http/env"
"github.com/Teajey/sqlstore" "github.com/Teajey/sqlstore"
_ "github.com/glebarez/go-sqlite" _ "github.com/glebarez/go-sqlite"

View File

@ -2,7 +2,7 @@ package db
import ( import (
"fmt" "fmt"
"lishwist/normalize" "lishwist/http/normalize"
"strconv" "strconv"
) )

View File

@ -3,7 +3,7 @@ package db
import ( import (
"database/sql" "database/sql"
"fmt" "fmt"
"lishwist/normalize" "lishwist/http/normalize"
"github.com/google/uuid" "github.com/google/uuid"
) )

View File

@ -1,8 +1,8 @@
package api package api
import ( import (
"lishwist/api/db" "lishwist/http/api/db"
"lishwist/templates" "lishwist/http/templates"
"log" "log"
"golang.org/x/crypto/bcrypt" "golang.org/x/crypto/bcrypt"

View File

@ -3,8 +3,8 @@ package api
import ( import (
"log" "log"
"lishwist/api/db" "lishwist/http/api/db"
"lishwist/templates" "lishwist/http/templates"
"golang.org/x/crypto/bcrypt" "golang.org/x/crypto/bcrypt"
) )

View File

@ -1,4 +1,4 @@
module lishwist module lishwist/http
go 1.23 go 1.23

View File

@ -5,12 +5,12 @@ import (
"log" "log"
"net/http" "net/http"
"lishwist/api" "lishwist/http/api"
// TODO: lishwist/api/db ought not to be used outside lishwist/api // TODO: lishwist/http/api/db ought not to be used outside lishwist/http/api
"lishwist/api/db" "lishwist/http/api/db"
"lishwist/env" "lishwist/http/env"
"lishwist/router" "lishwist/http/router"
"lishwist/routing" "lishwist/http/routing"
) )
func main() { func main() {

View File

@ -1,7 +1,7 @@
package router package router
import ( import (
"lishwist/rsvp" "lishwist/http/rsvp"
"net/http" "net/http"
"github.com/Teajey/sqlstore" "github.com/Teajey/sqlstore"

View File

@ -1,8 +1,8 @@
package routing package routing
import ( import (
"lishwist/api/db" "lishwist/http/api/db"
"lishwist/rsvp" "lishwist/http/rsvp"
"net/http" "net/http"
) )

View File

@ -1,8 +1,8 @@
package routing package routing
import ( import (
"lishwist/api/db" "lishwist/http/api/db"
"lishwist/rsvp" "lishwist/http/rsvp"
"net/http" "net/http"
) )

View File

@ -4,8 +4,8 @@ import (
"net/http" "net/http"
"slices" "slices"
"lishwist/api/db" "lishwist/http/api/db"
"lishwist/rsvp" "lishwist/http/rsvp"
) )
type GroupProps struct { type GroupProps struct {

View File

@ -3,9 +3,9 @@ package routing
import ( import (
"net/http" "net/http"
"lishwist/api/db" "lishwist/http/api/db"
"lishwist/env" "lishwist/http/env"
"lishwist/rsvp" "lishwist/http/rsvp"
) )
type HomeProps struct { type HomeProps struct {

View File

@ -1,8 +1,8 @@
package routing package routing
import ( import (
"lishwist/api" "lishwist/http/api"
"lishwist/rsvp" "lishwist/http/rsvp"
"net/http" "net/http"
) )

View File

@ -1,7 +1,7 @@
package routing package routing
import ( import (
"lishwist/rsvp" "lishwist/http/rsvp"
"net/http" "net/http"
) )

View File

@ -3,7 +3,7 @@ package routing
import ( import (
"net/http" "net/http"
"lishwist/rsvp" "lishwist/http/rsvp"
) )
func NotFound(h http.Header, r *rsvp.Request) rsvp.Response { func NotFound(h http.Header, r *rsvp.Request) rsvp.Response {

View File

@ -1,8 +1,8 @@
package routing package routing
import ( import (
"lishwist/api" "lishwist/http/api"
"lishwist/rsvp" "lishwist/http/rsvp"
"net/http" "net/http"
) )

View File

@ -1,8 +1,8 @@
package routing package routing
import ( import (
"lishwist/api/db" "lishwist/http/api/db"
"lishwist/rsvp" "lishwist/http/rsvp"
"net/http" "net/http"
) )

View File

@ -1,8 +1,8 @@
package routing package routing
import ( import (
"lishwist/api/db" "lishwist/http/api/db"
"lishwist/rsvp" "lishwist/http/rsvp"
"net/http" "net/http"
) )

View File

@ -1,8 +1,8 @@
package routing package routing
import ( import (
"lishwist/api/db" "lishwist/http/api/db"
"lishwist/rsvp" "lishwist/http/rsvp"
"net/http" "net/http"
) )

View File

@ -4,7 +4,7 @@ import (
"bytes" "bytes"
"encoding/json" "encoding/json"
"fmt" "fmt"
"lishwist/templates" "lishwist/http/templates"
"log" "log"
"net/http" "net/http"
"strings" "strings"