refac: rename current module to http
This commit is contained in:
parent
9ea200464d
commit
d89b855299
|
|
@ -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/
|
||||||
|
|
|
||||||
2
go.work
2
go.work
|
|
@ -2,4 +2,4 @@ go 1.23
|
||||||
|
|
||||||
toolchain go1.23.3
|
toolchain go1.23.3
|
||||||
|
|
||||||
use ./server
|
use ./http
|
||||||
|
|
|
||||||
|
|
@ -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"
|
||||||
|
|
@ -2,7 +2,7 @@ package db
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"lishwist/normalize"
|
"lishwist/http/normalize"
|
||||||
"strconv"
|
"strconv"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -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"
|
||||||
)
|
)
|
||||||
|
|
@ -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"
|
||||||
|
|
@ -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"
|
||||||
)
|
)
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
module lishwist
|
module lishwist/http
|
||||||
|
|
||||||
go 1.23
|
go 1.23
|
||||||
|
|
||||||
|
|
@ -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() {
|
||||||
|
|
@ -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"
|
||||||
|
|
@ -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"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -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"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -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 {
|
||||||
|
|
@ -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 {
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
package routing
|
package routing
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"lishwist/api"
|
"lishwist/http/api"
|
||||||
"lishwist/rsvp"
|
"lishwist/http/rsvp"
|
||||||
"net/http"
|
"net/http"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
package routing
|
package routing
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"lishwist/rsvp"
|
"lishwist/http/rsvp"
|
||||||
"net/http"
|
"net/http"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -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 {
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
package routing
|
package routing
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"lishwist/api"
|
"lishwist/http/api"
|
||||||
"lishwist/rsvp"
|
"lishwist/http/rsvp"
|
||||||
"net/http"
|
"net/http"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -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"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -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"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -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"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -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"
|
||||||
Loading…
Reference in New Issue