Skip to content

Commit

Permalink
Merge branch 'develop' into feat/kubosaka/intro-minio-client-go
Browse files Browse the repository at this point in the history
  • Loading branch information
Kubosaka committed Jan 22, 2025
2 parents a97df2e + 6ae3ae1 commit 3b015dc
Show file tree
Hide file tree
Showing 14 changed files with 1,913 additions and 27 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- name: Set up go
uses: actions/setup-go@v2
with:
go-version: 1.14
go-version: 1.16
- name: golangci-lint
uses: reviewdog/action-golangci-lint@v1
with:
Expand Down
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,10 @@ ent-db:
run-eslint:
docker compose exec view npm run lint

# apiテストの実行
run-test:
docker compose exec api go test ./test -v

gen:
make gen-api
make gen-front-api
Expand All @@ -90,3 +94,4 @@ run-all:
make run-db
make run
make run-swagger

4 changes: 2 additions & 2 deletions api/drivers/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"github.com/labstack/echo/v4/middleware"
)

func RunServer(router router.Router) {
func RunServer(router router.Router) *echo.Echo {
// echoのインスタンス
e := echo.New()

Expand All @@ -35,5 +35,5 @@ func RunServer(router router.Router) {
router.ProvideRouter(e)

// サーバー起動
e.Start(":1323")
return e
}
6 changes: 2 additions & 4 deletions api/externals/controller/user_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,18 +82,17 @@ func (u *userController) DestroyUser(c echo.Context) error {

// Destroy
func (u *userController) DestroyMultiUsers(c echo.Context) error {
destroyUser := new(domain.DestroyUserIDs)
destroyUser := new(domain.DestroyUserIDs)
if err := c.Bind(destroyUser); err != nil {
return err
}
err := u.u.DestroyMultiUsers(c.Request().Context(), destroyUser.DeleteIDs)
if err != nil {
return c.String(http.StatusBadRequest,err.Error())
return c.String(http.StatusBadRequest, err.Error())
}
return c.String(http.StatusOK, "Destroy Users")
}


// ログインユーザーの取得
func (auth *userController) GetCurrentUser(c echo.Context) error {
// headerからトークンを取得する
Expand All @@ -107,4 +106,3 @@ func (auth *userController) GetCurrentUser(c echo.Context) error {
return nil
}
}

63 changes: 57 additions & 6 deletions api/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,15 @@ toolchain go1.23.4

require (
github.com/doug-martin/goqu/v9 v9.19.0
github.com/go-sql-driver/mysql v1.6.0
github.com/joho/godotenv v1.4.0
github.com/go-sql-driver/mysql v1.8.1
github.com/go-test/deep v1.0.8 // indirect
github.com/joho/godotenv v1.5.1
github.com/labstack/echo/v4 v4.11.4
github.com/minio/minio-go/v7 v7.0.83
github.com/oapi-codegen/runtime v1.1.1
github.com/pkg/errors v0.9.1
github.com/slack-go/slack v0.13.0
github.com/stretchr/testify v1.9.0
golang.org/x/crypto v0.31.0
gorm.io/driver/mysql v1.3.3
gorm.io/gorm v1.23.4
Expand All @@ -22,10 +24,8 @@ require (
github.com/apapsch/go-jsonmerge/v2 v2.0.0 // indirect
github.com/dustin/go-humanize v1.0.1 // indirect
github.com/go-ini/ini v1.67.0 // indirect
github.com/go-test/deep v1.0.8 // indirect
github.com/goccy/go-json v0.10.4 // indirect
github.com/golang-jwt/jwt v3.2.2+incompatible // indirect
github.com/google/go-cmp v0.6.0 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/gorilla/websocket v1.5.0 // indirect
github.com/jinzhu/inflection v1.0.0 // indirect
Expand All @@ -37,11 +37,62 @@ require (
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/minio/md5-simd v1.1.2 // indirect
github.com/rs/xid v1.6.0 // indirect
github.com/stretchr/objx v0.5.2 // indirect
github.com/valyala/bytebufferpool v1.0.0 // indirect
github.com/valyala/fasttemplate v1.2.2 // indirect
golang.org/x/net v0.33.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
golang.org/x/time v0.7.0 // indirect
)

require github.com/go-testfixtures/testfixtures/v3 v3.14.0

require (
cel.dev/expr v0.16.0 // indirect
cloud.google.com/go v0.116.0 // indirect
cloud.google.com/go/auth v0.9.9 // indirect
cloud.google.com/go/auth/oauth2adapt v0.2.4 // indirect
cloud.google.com/go/compute/metadata v0.5.2 // indirect
cloud.google.com/go/iam v1.2.1 // indirect
cloud.google.com/go/longrunning v0.6.1 // indirect
cloud.google.com/go/monitoring v1.21.1 // indirect
cloud.google.com/go/spanner v1.73.0 // indirect
filippo.io/edwards25519 v1.1.0 // indirect
github.com/GoogleCloudPlatform/grpc-gcp-go/grpcgcp v1.5.0 // indirect
github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.24.1 // indirect
github.com/census-instrumentation/opencensus-proto v0.4.1 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/cncf/xds/go v0.0.0-20240822171458-6449f94b4d59 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/envoyproxy/go-control-plane v0.13.0 // indirect
github.com/envoyproxy/protoc-gen-validate v1.1.0 // indirect
github.com/felixge/httpsnoop v1.0.4 // indirect
github.com/go-logr/logr v1.4.2 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/google/s2a-go v0.1.8 // indirect
github.com/googleapis/enterprise-certificate-proxy v0.3.4 // indirect
github.com/googleapis/gax-go/v2 v2.13.0 // indirect
github.com/googleapis/go-sql-spanner v1.7.4 // indirect
github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/rogpeppe/go-internal v1.12.0 // indirect
go.opencensus.io v0.24.0 // indirect
go.opentelemetry.io/contrib/detectors/gcp v1.29.0 // indirect
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.54.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.54.0 // indirect
go.opentelemetry.io/otel v1.29.0 // indirect
go.opentelemetry.io/otel/metric v1.29.0 // indirect
go.opentelemetry.io/otel/sdk v1.29.0 // indirect
go.opentelemetry.io/otel/sdk/metric v1.29.0 // indirect
go.opentelemetry.io/otel/trace v1.29.0 // indirect
golang.org/x/oauth2 v0.23.0 // indirect
golang.org/x/sync v0.10.0 // indirect
google.golang.org/api v0.203.0 // indirect
google.golang.org/genproto v0.0.0-20241015192408-796eee8c2d53 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20241007155032-5fefd90f89a9 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20241015192408-796eee8c2d53 // indirect
google.golang.org/grpc v1.67.1 // indirect
google.golang.org/protobuf v1.35.1 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
Loading

0 comments on commit 3b015dc

Please sign in to comment.