Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deploymentをセットアップ #39

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,6 @@ go.work
docker/minio/data/**
docker/mysql/db/**

deployment/secrets.yml
deployment/**/secrets.yml

build/**
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ gen-proto:
test:
go test -v ./...

gen-schema:
sqlboiler mysql -c database.toml -o ./internal/adaptor/repository/mysql/shcema -p schema --no-tests --wipe

gen-migration:
migrate create -ext sql -dir ./db/migration -seq ${MIGRATION}

Expand All @@ -22,4 +19,7 @@ migrate-drop:
migrate --path db/migration --database "mysql://${MYSQL_USER}:${MYSQL_PASSWORD}@tcp(${MYSQL_HOST}:${MYSQL_PORT})/${MYSQL_DATABASE}" --verbose drop

run:
go run cmd/server/main.go
go run cmd/server/main.go

build:
go build -o ./build/server ./cmd/server/main.go
129 changes: 0 additions & 129 deletions internal/adaptor/event/rabbitmq/handler.go

This file was deleted.

73 changes: 0 additions & 73 deletions internal/adaptor/gateway/transfer/minio/handler.go

This file was deleted.

70 changes: 0 additions & 70 deletions internal/adaptor/gateway/transfer/mock/file.go

This file was deleted.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,21 @@ import (
"database/sql"
"errors"

"github.com/CityBear3/satellite/internal/adaptor/gateway/repository/mysql/shcema"
"github.com/CityBear3/satellite/internal/adaptor/repository/mysql/shcema"
"github.com/CityBear3/satellite/internal/domain/entity"
"github.com/CityBear3/satellite/internal/domain/gateway/transfer"
"github.com/CityBear3/satellite/internal/domain/primitive"
"github.com/CityBear3/satellite/internal/domain/primitive/archive"
"github.com/CityBear3/satellite/internal/pkg/apperrs"
"github.com/CityBear3/satellite/internal/usecase/service"
"github.com/volatiletech/sqlboiler/v4/boil"
)

type ArchiveRepository struct {
db boil.ContextExecutor
fileTransfer transfer.IFileTransfer
fileTransfer service.IFileService
}

func NewArchiveRepository(db boil.ContextExecutor, fileTransfer transfer.IFileTransfer) *ArchiveRepository {
func NewArchiveRepository(db boil.ContextExecutor, fileTransfer service.IFileService) *ArchiveRepository {
return &ArchiveRepository{
db: db,
fileTransfer: fileTransfer,
Expand Down Expand Up @@ -68,6 +68,7 @@ func (i *ArchiveRepository) GetArchive(
if errors.Is(err, sql.ErrNoRows) {
return entity.Archive{}, apperrs.NotFoundArchiveError
}

if err != nil {
return entity.Archive{}, err
}
Expand Down
Loading