fix imports
Some checks failed
dev test / test (push) Failing after 52s
dev test / vulnCheck (push) Has been skipped
dev test / Ci-Lint (push) Has been skipped

This commit is contained in:
maximo tejeda 2024-12-02 20:11:31 -04:00
parent b655097bbc
commit e986d8884a
18 changed files with 53 additions and 48 deletions

View File

@ -4,8 +4,10 @@ ARG version=not-set
ARG SHORTSHA=not-set
WORKDIR /app
COPY . .
ENV GOPRIVATE=git.maximotejeda.com/maximo,github.com/maximotejeda
ENV GOPROXY=direct
# https://stackoverflow.com/questions/70369368/check-architecture-in-dockerfile-to-get-amd-arm
RUN GOPROXY=direct go build -o bin/crawler \
RUN go build -o bin/crawler \
-ldflags "-X main.Shortsha=${SHORTSHA} \
-X main.Version=${version} \
-X main.Aarch=${TARGETARCH}" ./cmd

View File

@ -3,10 +3,10 @@ package main
import (
"log/slog"
"github.com/maximotejeda/us_dop_scrapper/config"
"github.com/maximotejeda/us_dop_scrapper/internal/adapters/crawler"
dl "github.com/maximotejeda/us_dop_scrapper/internal/adapters/dolar"
"github.com/maximotejeda/us_dop_scrapper/internal/application/core/api"
"git.maximotejeda.com/maximo/us_dop_scrapper/config"
"git.maximotejeda.com/maximo/us_dop_scrapper/internal/adapters/crawler"
dl "git.maximotejeda.com/maximo/us_dop_scrapper/internal/adapters/dolar"
"git.maximotejeda.com/maximo/us_dop_scrapper/internal/application/core/api"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials/insecure"
)

3
go.mod
View File

@ -1,10 +1,11 @@
module github.com/maximotejeda/us_dop_scrapper
module git.maximotejeda.com/maximo/us_dop_scrapper
go 1.23
toolchain go1.23.2
require (
git.maximotejeda.com/maximo/dolar v0.0.1
github.com/nats-io/nats.go v1.34.1
github.com/playwright-community/playwright-go v0.4001.0
golang.org/x/text v0.16.0

2
go.sum
View File

@ -1,3 +1,5 @@
git.maximotejeda.com/maximo/dolar v0.0.1 h1:pRO0qHRHzKlTsZtXRM4QT8VjPsS2AwOduOKIISWbXTU=
git.maximotejeda.com/maximo/dolar v0.0.1/go.mod h1:I3q+2GDNEwMSfSLg/7g5lkI+EWPR/90JvMO94KoFKBs=
github.com/danwakefield/fnmatch v0.0.0-20160403171240-cbb64ac3d964 h1:y5HC9v93H5EPKqaS1UYVg1uYah5Xf51mBfIoWehClUQ=
github.com/danwakefield/fnmatch v0.0.0-20160403171240-cbb64ac3d964/go.mod h1:Xd9hchkHSWYkEqJwUGisez3G1QY8Ryz0sdWrLPMGjLk=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=

View File

@ -6,10 +6,10 @@ import (
"log/slog"
"time"
"github.com/maximotejeda/us_dop_scrapper/config"
"github.com/maximotejeda/us_dop_scrapper/helpers"
"github.com/maximotejeda/us_dop_scrapper/internal/application/core/domain"
"github.com/maximotejeda/us_dop_scrapper/internal/ports"
"git.maximotejeda.com/maximo/us_dop_scrapper/config"
"git.maximotejeda.com/maximo/us_dop_scrapper/helpers"
"git.maximotejeda.com/maximo/us_dop_scrapper/internal/application/core/domain"
"git.maximotejeda.com/maximo/us_dop_scrapper/internal/ports"
"github.com/playwright-community/playwright-go"
)

View File

@ -6,10 +6,10 @@ import (
"log/slog"
"time"
"github.com/maximotejeda/us_dop_scrapper/config"
"github.com/maximotejeda/us_dop_scrapper/helpers"
"github.com/maximotejeda/us_dop_scrapper/internal/application/core/domain"
"github.com/maximotejeda/us_dop_scrapper/internal/ports"
"git.maximotejeda.com/maximo/us_dop_scrapper/config"
"git.maximotejeda.com/maximo/us_dop_scrapper/helpers"
"git.maximotejeda.com/maximo/us_dop_scrapper/internal/application/core/domain"
"git.maximotejeda.com/maximo/us_dop_scrapper/internal/ports"
"github.com/playwright-community/playwright-go"
)

View File

@ -6,10 +6,10 @@ import (
"log/slog"
"time"
"github.com/maximotejeda/us_dop_scrapper/config"
"github.com/maximotejeda/us_dop_scrapper/helpers"
"github.com/maximotejeda/us_dop_scrapper/internal/application/core/domain"
"github.com/maximotejeda/us_dop_scrapper/internal/ports"
"git.maximotejeda.com/maximo/us_dop_scrapper/config"
"git.maximotejeda.com/maximo/us_dop_scrapper/helpers"
"git.maximotejeda.com/maximo/us_dop_scrapper/internal/application/core/domain"
"git.maximotejeda.com/maximo/us_dop_scrapper/internal/ports"
"github.com/playwright-community/playwright-go"
)

View File

@ -7,10 +7,10 @@ import (
"strings"
"time"
"github.com/maximotejeda/us_dop_scrapper/config"
"github.com/maximotejeda/us_dop_scrapper/helpers"
"github.com/maximotejeda/us_dop_scrapper/internal/application/core/domain"
"github.com/maximotejeda/us_dop_scrapper/internal/ports"
"git.maximotejeda.com/maximo/us_dop_scrapper/config"
"git.maximotejeda.com/maximo/us_dop_scrapper/helpers"
"git.maximotejeda.com/maximo/us_dop_scrapper/internal/application/core/domain"
"git.maximotejeda.com/maximo/us_dop_scrapper/internal/ports"
"github.com/playwright-community/playwright-go"
)

View File

@ -6,10 +6,10 @@ import (
"log/slog"
"time"
"github.com/maximotejeda/us_dop_scrapper/config"
"github.com/maximotejeda/us_dop_scrapper/helpers"
"github.com/maximotejeda/us_dop_scrapper/internal/application/core/domain"
"github.com/maximotejeda/us_dop_scrapper/internal/ports"
"git.maximotejeda.com/maximo/us_dop_scrapper/config"
"git.maximotejeda.com/maximo/us_dop_scrapper/helpers"
"git.maximotejeda.com/maximo/us_dop_scrapper/internal/application/core/domain"
"git.maximotejeda.com/maximo/us_dop_scrapper/internal/ports"
"github.com/playwright-community/playwright-go"
)

View File

@ -7,9 +7,9 @@ import (
"strconv"
"time"
"github.com/maximotejeda/us_dop_scrapper/config"
"github.com/maximotejeda/us_dop_scrapper/internal/application/core/domain"
"github.com/maximotejeda/us_dop_scrapper/internal/ports"
"git.maximotejeda.com/maximo/us_dop_scrapper/config"
"git.maximotejeda.com/maximo/us_dop_scrapper/internal/application/core/domain"
"git.maximotejeda.com/maximo/us_dop_scrapper/internal/ports"
"github.com/playwright-community/playwright-go"
)

View File

@ -3,7 +3,7 @@ package crawler
import (
"fmt"
"github.com/maximotejeda/us_dop_scrapper/internal/ports"
"git.maximotejeda.com/maximo/us_dop_scrapper/internal/ports"
)
func Selector(who string, client ports.DollarPort) (ports.APIPorts, error) {

View File

@ -6,10 +6,10 @@ import (
"strings"
"time"
"github.com/maximotejeda/us_dop_scrapper/config"
"github.com/maximotejeda/us_dop_scrapper/helpers"
"github.com/maximotejeda/us_dop_scrapper/internal/application/core/domain"
"github.com/maximotejeda/us_dop_scrapper/internal/ports"
"git.maximotejeda.com/maximo/us_dop_scrapper/config"
"git.maximotejeda.com/maximo/us_dop_scrapper/helpers"
"git.maximotejeda.com/maximo/us_dop_scrapper/internal/application/core/domain"
"git.maximotejeda.com/maximo/us_dop_scrapper/internal/ports"
"github.com/playwright-community/playwright-go"
)

View File

@ -7,10 +7,10 @@ import (
"time"
"github.com/maximotejeda/us_dop_scrapper/config"
"github.com/maximotejeda/us_dop_scrapper/helpers"
"github.com/maximotejeda/us_dop_scrapper/internal/application/core/domain"
"github.com/maximotejeda/us_dop_scrapper/internal/ports"
"git.maximotejeda.com/maximo/us_dop_scrapper/config"
"git.maximotejeda.com/maximo/us_dop_scrapper/helpers"
"git.maximotejeda.com/maximo/us_dop_scrapper/internal/application/core/domain"
"git.maximotejeda.com/maximo/us_dop_scrapper/internal/ports"
"github.com/playwright-community/playwright-go"
)

View File

@ -5,10 +5,10 @@ import (
"log/slog"
"time"
"github.com/maximotejeda/us_dop_scrapper/config"
"github.com/maximotejeda/us_dop_scrapper/helpers"
"github.com/maximotejeda/us_dop_scrapper/internal/application/core/domain"
"github.com/maximotejeda/us_dop_scrapper/internal/ports"
"git.maximotejeda.com/maximo/us_dop_scrapper/config"
"git.maximotejeda.com/maximo/us_dop_scrapper/helpers"
"git.maximotejeda.com/maximo/us_dop_scrapper/internal/application/core/domain"
"git.maximotejeda.com/maximo/us_dop_scrapper/internal/ports"
"github.com/playwright-community/playwright-go"
)

View File

@ -4,7 +4,7 @@ import (
"context"
dl "git.maximotejeda.com/maximo/dolar/proto/golang/dolar"
"github.com/maximotejeda/us_dop_scrapper/internal/application/core/domain"
"git.maximotejeda.com/maximo/us_dop_scrapper/internal/application/core/domain"
"google.golang.org/grpc"
)
@ -14,7 +14,7 @@ type Adapter struct {
}
func NewAdapter(conn *grpc.ClientConn) (*Adapter, error) {
client := dolar.NewDollarClient(conn)
client := dl.NewDollarClient(conn)
return &Adapter{dolar: client, conn: conn}, nil
}

View File

@ -6,8 +6,8 @@ import (
"os"
"time"
"github.com/maximotejeda/us_dop_scrapper/helpers"
"github.com/maximotejeda/us_dop_scrapper/internal/ports"
"git.maximotejeda.com/maximo/us_dop_scrapper/helpers"
"git.maximotejeda.com/maximo/us_dop_scrapper/internal/ports"
"github.com/playwright-community/playwright-go"
)

View File

@ -4,7 +4,7 @@ import (
"context"
"log/slog"
"github.com/maximotejeda/us_dop_scrapper/internal/application/core/domain"
"git.maximotejeda.com/maximo/us_dop_scrapper/internal/application/core/domain"
"github.com/playwright-community/playwright-go"
)

View File

@ -1,6 +1,6 @@
package ports
import "github.com/maximotejeda/us_dop_scrapper/internal/application/core/domain"
import "git.maximotejeda.com/maximogo /us_dop_scrapper/internal/application/core/domain"
type DollarPort interface {
NewHistory(*domain.History) error