Skip to content

Commit

Permalink
Atualização de versões
Browse files Browse the repository at this point in the history
  • Loading branch information
GSabadini committed Nov 13, 2023
1 parent 736305e commit a94af40
Show file tree
Hide file tree
Showing 14 changed files with 17 additions and 418 deletions.
14 changes: 5 additions & 9 deletions Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
FROM golang:1.14-stretch

FROM golang:1.21
WORKDIR /app

COPY . .

RUN go mod download && go get github.com/cespare/reflex

COPY /reflex.conf /

ENTRYPOINT ["reflex", "-c", "./reflex.conf"]
RUN go mod download
RUN go build -o /go-transactions
EXPOSE 3001
CMD ["/go-transactions"]
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
PWD = $(shell pwd -L)
IMAGE_NAME = gsabadini/go-transactions
DOCKER_RUN = docker run --rm -it -w /app -v ${PWD}:/app golang:1.14-stretch
DOCKER_RUN = docker run --rm -it -w /app -v ${PWD}:/app golang:1.21-alpine

start: init up

Expand Down
12 changes: 0 additions & 12 deletions _scripts/mysql/init.sql
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,6 @@ CREATE TABLE transactions (
FOREIGN KEY (operation_id) REFERENCES operations(id)
);

CREATE TABLE authorizations (
id VARCHAR(36) PRIMARY KEY UNIQUE,
account_id VARCHAR(36) NOT NULL,
operation_id VARCHAR(36) NOT NULL,
amount INTEGER NOT NULL,
created_at TIMESTAMP,

FOREIGN KEY (account_id) REFERENCES accounts(id),
FOREIGN KEY (operation_id) REFERENCES operations(id)
);


INSERT
INTO
`operations` (`id`, `description`, `type`)
Expand Down
1 change: 0 additions & 1 deletion adapter/api/handler/create_cancel.go

This file was deleted.

1 change: 0 additions & 1 deletion adapter/api/handler/create_cashin.go

This file was deleted.

71 changes: 0 additions & 71 deletions adapter/api/handler/create_cashout.go

This file was deleted.

1 change: 0 additions & 1 deletion adapter/api/handler/create_peer_too_peer.go

This file was deleted.

30 changes: 0 additions & 30 deletions adapter/presenter/create_cashout.go

This file was deleted.

65 changes: 0 additions & 65 deletions adapter/repository/create_authorization.go

This file was deleted.

8 changes: 4 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
version: "3.3"
version: "3.7"

services:
app:
container_name: "app"
container_name: "go-transactions"
build:
context: .
dockerfile: Dockerfile.dev
ports:
- 3001:3001
- "3001:3001"
volumes:
- .:/app
env_file:
- .env

mysql:
container_name: "mysql"
container_name: "mysql-transactions"
image: mysql:5.7
env_file:
- .env
Expand Down
52 changes: 0 additions & 52 deletions domain/authorization.go

This file was deleted.

8 changes: 7 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/GSabadini/go-transactions

go 1.14
go 1.21

require (
github.com/go-playground/locales v0.13.0
Expand All @@ -11,3 +11,9 @@ require (
github.com/gorilla/mux v1.8.0
github.com/pkg/errors v0.9.1
)

require (
github.com/leodido/go-urn v1.2.0 // indirect
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 // indirect
golang.org/x/sys v0.0.0-20190412213103-97732733099d // indirect
)
1 change: 0 additions & 1 deletion go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
Loading

0 comments on commit a94af40

Please sign in to comment.