Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
12ddfb3
Bump github.com/docker/docker
dependabot[bot] Mar 20, 2024
94b6d38
change db to postgres
wen-templari Apr 3, 2024
0752837
tidy
wen-templari Apr 3, 2024
908a2f6
save
wen-templari May 21, 2024
5f9e5cc
migrate at db init
wen-templari May 21, 2024
206b800
include migtations at docker build
wen-templari May 21, 2024
b6fc8f7
fix copy migration at dockerfile
wen-templari May 21, 2024
2799180
fix db init, keep conn open
wen-templari May 21, 2024
7aaeddd
init
wen-templari Jun 30, 2024
dacb6fd
update router
wen-templari Aug 12, 2024
29dcb97
update action branch name
wen-templari Aug 12, 2024
8943bf4
update action branch name
wen-templari Aug 12, 2024
609c480
Merge branch 'dev' into huma
wen-templari Aug 12, 2024
5aa4185
Merge pull request #140 from nbtca/huma
wen-templari Aug 12, 2024
a50b3fe
fix return value
wen-templari Aug 12, 2024
d5572cb
change doc title
wen-templari Aug 12, 2024
b5bc436
fix sql
wen-templari Jun 30, 2024
e675b06
fix router params
wen-templari Dec 5, 2024
d8d1cd0
add local env to cors config
wen-templari Dec 5, 2024
c81211f
read role from logto
wen-templari Dec 24, 2024
ab54ae9
update role matching login
wen-templari Dec 24, 2024
4749857
update sql
wen-templari Dec 24, 2024
eff9ef5
fix router url
wen-templari Dec 24, 2024
84afac8
fix sql, use RETURNING instead of LastInserId
wen-templari Dec 24, 2024
8747002
use user info endpoint to fetch logto user (#152)
wen-templari Feb 15, 2025
11879f8
add test (#151)
wen-templari Feb 15, 2025
2aa5bbe
fix: fix sql (#150)
wen-templari Feb 15, 2025
e166d64
Merge branch 'main' into dev
wen-templari Feb 15, 2025
ecd8b69
Merge branch 'main' into dev
wen-templari Feb 15, 2025
d00cd92
add logto id to client
wen-templari Feb 16, 2025
e3d6458
Merge pull request #159 from nbtca/client-with-logto
wen-templari Feb 16, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
"gomail",
"gonic",
"hackintosh",
"huma",
"humagin",
"Infof",
"jmoiron",
"joho",
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
FROM golang as builder
COPY . /app
WORKDIR /app
# RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o saturday .
RUN go env -w CGO_ENABLED=0 &&\
go build -v -o saturday .

Expand All @@ -12,6 +11,7 @@ RUN apk add --no-cache tzdata &&\

WORKDIR /app
COPY --from=builder /app/saturday /app
COPY --from=builder /app/migrations /app/migrations

ENV Port=80

Expand Down
14 changes: 14 additions & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
version: "3"
services:
server:
image: ghcr.io/nbtca/saturday
ports:
- 80:80
volumes:
- ./logs/:/app/logs/
environment:
DB_URL: root:password@(host.docker.internal:3306)/saturday_dev?parseTime=True
PORT: 80
extra_hosts:
- "host.docker.internal:host-gateway"

40 changes: 26 additions & 14 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,18 +1,22 @@
module github.com/nbtca/saturday

go 1.17
go 1.22

toolchain go1.23.4

require (
github.com/Masterminds/squirrel v1.5.4
github.com/MicahParks/keyfunc v1.9.0
github.com/aliyun/aliyun-oss-go-sdk v3.0.2+incompatible
github.com/danielgtaylor/huma/v2 v2.28.0
github.com/gin-contrib/cors v1.6.0
github.com/gin-gonic/gin v1.9.1
github.com/go-playground/validator/v10 v10.19.0
github.com/gin-gonic/gin v1.10.0
github.com/go-playground/validator/v10 v10.22.1
github.com/go-sql-driver/mysql v1.7.1
github.com/golang-jwt/jwt/v4 v4.5.1
github.com/jmoiron/sqlx v1.3.5
github.com/joho/godotenv v1.5.1
github.com/lib/pq v1.10.9
github.com/nsqio/go-nsq v1.1.0
github.com/ory/dockertest/v3 v3.10.0
github.com/qustavo/sqlhooks/v2 v2.1.0
Expand All @@ -21,15 +25,22 @@ require (

require (
dario.cat/mergo v1.0.0 // indirect
github.com/bytedance/sonic v1.11.2 // indirect
github.com/chenzhuoyu/base64x v0.0.0-20230717121745-296ad89f973d // indirect
github.com/chenzhuoyu/iasm v0.9.1 // indirect
github.com/gabriel-vasile/mimetype v1.4.3 // indirect
github.com/golang/snappy v0.0.1 // indirect
github.com/klauspost/cpuid/v2 v2.2.7 // indirect
github.com/bytedance/sonic v1.12.3 // indirect
github.com/bytedance/sonic/loader v0.2.0 // indirect
github.com/cloudwego/base64x v0.1.4 // indirect
github.com/cloudwego/iasm v0.2.0 // indirect
github.com/distribution/reference v0.6.0 // indirect
github.com/gabriel-vasile/mimetype v1.4.5 // indirect
github.com/golang/snappy v0.0.4 // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
github.com/klauspost/cpuid/v2 v2.2.8 // indirect
github.com/kr/text v0.1.0 // indirect
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
golang.org/x/arch v0.7.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.51.0 // indirect
go.opentelemetry.io/otel/trace v1.26.0 // indirect
go.uber.org/atomic v1.7.0 // indirect
golang.org/x/arch v0.11.0 // indirect
golang.org/x/mod v0.17.0 // indirect
golang.org/x/sync v0.10.0 // indirect
golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d // indirect
Expand All @@ -50,8 +61,9 @@ require (
github.com/gin-contrib/sse v0.1.0 // indirect
github.com/go-playground/locales v0.14.1 // indirect
github.com/go-playground/universal-translator v0.18.1 // indirect
github.com/goccy/go-json v0.10.2 // indirect
github.com/goccy/go-json v0.10.3 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang-migrate/migrate/v4 v4.17.1
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/lann/builder v0.0.0-20180802200727-47ae307949d0 // indirect
Expand All @@ -65,18 +77,18 @@ require (
github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/opencontainers/image-spec v1.0.2 // indirect
github.com/opencontainers/runc v1.1.14 // indirect
github.com/pelletier/go-toml/v2 v2.1.1 // indirect
github.com/pelletier/go-toml/v2 v2.2.3 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/ugorji/go/codec v1.2.12 // indirect
github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
github.com/xeipuuv/gojsonschema v1.2.0 // indirect
golang.org/x/crypto v0.31.0 // indirect
golang.org/x/net v0.25.0 // indirect
golang.org/x/net v0.30.0 // indirect
golang.org/x/sys v0.28.0 // indirect
golang.org/x/text v0.21.0 // indirect
golang.org/x/time v0.5.0 // indirect
google.golang.org/protobuf v1.33.0 // indirect
google.golang.org/protobuf v1.35.1 // indirect
gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc // indirect
gopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df
gopkg.in/yaml.v2 v2.4.0 // indirect
Expand Down
Loading
Loading