fix imports
This commit is contained in:
parent
b655097bbc
commit
e986d8884a
@ -4,8 +4,10 @@ ARG version=not-set
|
|||||||
ARG SHORTSHA=not-set
|
ARG SHORTSHA=not-set
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY . .
|
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
|
# 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} \
|
-ldflags "-X main.Shortsha=${SHORTSHA} \
|
||||||
-X main.Version=${version} \
|
-X main.Version=${version} \
|
||||||
-X main.Aarch=${TARGETARCH}" ./cmd
|
-X main.Aarch=${TARGETARCH}" ./cmd
|
||||||
|
|||||||
@ -3,10 +3,10 @@ package main
|
|||||||
import (
|
import (
|
||||||
"log/slog"
|
"log/slog"
|
||||||
|
|
||||||
"github.com/maximotejeda/us_dop_scrapper/config"
|
"git.maximotejeda.com/maximo/us_dop_scrapper/config"
|
||||||
"github.com/maximotejeda/us_dop_scrapper/internal/adapters/crawler"
|
"git.maximotejeda.com/maximo/us_dop_scrapper/internal/adapters/crawler"
|
||||||
dl "github.com/maximotejeda/us_dop_scrapper/internal/adapters/dolar"
|
dl "git.maximotejeda.com/maximo/us_dop_scrapper/internal/adapters/dolar"
|
||||||
"github.com/maximotejeda/us_dop_scrapper/internal/application/core/api"
|
"git.maximotejeda.com/maximo/us_dop_scrapper/internal/application/core/api"
|
||||||
"google.golang.org/grpc"
|
"google.golang.org/grpc"
|
||||||
"google.golang.org/grpc/credentials/insecure"
|
"google.golang.org/grpc/credentials/insecure"
|
||||||
)
|
)
|
||||||
|
|||||||
3
go.mod
3
go.mod
@ -1,10 +1,11 @@
|
|||||||
module github.com/maximotejeda/us_dop_scrapper
|
module git.maximotejeda.com/maximo/us_dop_scrapper
|
||||||
|
|
||||||
go 1.23
|
go 1.23
|
||||||
|
|
||||||
toolchain go1.23.2
|
toolchain go1.23.2
|
||||||
|
|
||||||
require (
|
require (
|
||||||
|
git.maximotejeda.com/maximo/dolar v0.0.1
|
||||||
github.com/nats-io/nats.go v1.34.1
|
github.com/nats-io/nats.go v1.34.1
|
||||||
github.com/playwright-community/playwright-go v0.4001.0
|
github.com/playwright-community/playwright-go v0.4001.0
|
||||||
golang.org/x/text v0.16.0
|
golang.org/x/text v0.16.0
|
||||||
|
|||||||
2
go.sum
2
go.sum
@ -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 h1:y5HC9v93H5EPKqaS1UYVg1uYah5Xf51mBfIoWehClUQ=
|
||||||
github.com/danwakefield/fnmatch v0.0.0-20160403171240-cbb64ac3d964/go.mod h1:Xd9hchkHSWYkEqJwUGisez3G1QY8Ryz0sdWrLPMGjLk=
|
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=
|
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||||
|
|||||||
@ -6,10 +6,10 @@ import (
|
|||||||
"log/slog"
|
"log/slog"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/maximotejeda/us_dop_scrapper/config"
|
"git.maximotejeda.com/maximo/us_dop_scrapper/config"
|
||||||
"github.com/maximotejeda/us_dop_scrapper/helpers"
|
"git.maximotejeda.com/maximo/us_dop_scrapper/helpers"
|
||||||
"github.com/maximotejeda/us_dop_scrapper/internal/application/core/domain"
|
"git.maximotejeda.com/maximo/us_dop_scrapper/internal/application/core/domain"
|
||||||
"github.com/maximotejeda/us_dop_scrapper/internal/ports"
|
"git.maximotejeda.com/maximo/us_dop_scrapper/internal/ports"
|
||||||
"github.com/playwright-community/playwright-go"
|
"github.com/playwright-community/playwright-go"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@ -6,10 +6,10 @@ import (
|
|||||||
"log/slog"
|
"log/slog"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/maximotejeda/us_dop_scrapper/config"
|
"git.maximotejeda.com/maximo/us_dop_scrapper/config"
|
||||||
"github.com/maximotejeda/us_dop_scrapper/helpers"
|
"git.maximotejeda.com/maximo/us_dop_scrapper/helpers"
|
||||||
"github.com/maximotejeda/us_dop_scrapper/internal/application/core/domain"
|
"git.maximotejeda.com/maximo/us_dop_scrapper/internal/application/core/domain"
|
||||||
"github.com/maximotejeda/us_dop_scrapper/internal/ports"
|
"git.maximotejeda.com/maximo/us_dop_scrapper/internal/ports"
|
||||||
"github.com/playwright-community/playwright-go"
|
"github.com/playwright-community/playwright-go"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@ -6,10 +6,10 @@ import (
|
|||||||
"log/slog"
|
"log/slog"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/maximotejeda/us_dop_scrapper/config"
|
"git.maximotejeda.com/maximo/us_dop_scrapper/config"
|
||||||
"github.com/maximotejeda/us_dop_scrapper/helpers"
|
"git.maximotejeda.com/maximo/us_dop_scrapper/helpers"
|
||||||
"github.com/maximotejeda/us_dop_scrapper/internal/application/core/domain"
|
"git.maximotejeda.com/maximo/us_dop_scrapper/internal/application/core/domain"
|
||||||
"github.com/maximotejeda/us_dop_scrapper/internal/ports"
|
"git.maximotejeda.com/maximo/us_dop_scrapper/internal/ports"
|
||||||
"github.com/playwright-community/playwright-go"
|
"github.com/playwright-community/playwright-go"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@ -7,10 +7,10 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/maximotejeda/us_dop_scrapper/config"
|
"git.maximotejeda.com/maximo/us_dop_scrapper/config"
|
||||||
"github.com/maximotejeda/us_dop_scrapper/helpers"
|
"git.maximotejeda.com/maximo/us_dop_scrapper/helpers"
|
||||||
"github.com/maximotejeda/us_dop_scrapper/internal/application/core/domain"
|
"git.maximotejeda.com/maximo/us_dop_scrapper/internal/application/core/domain"
|
||||||
"github.com/maximotejeda/us_dop_scrapper/internal/ports"
|
"git.maximotejeda.com/maximo/us_dop_scrapper/internal/ports"
|
||||||
"github.com/playwright-community/playwright-go"
|
"github.com/playwright-community/playwright-go"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@ -6,10 +6,10 @@ import (
|
|||||||
"log/slog"
|
"log/slog"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/maximotejeda/us_dop_scrapper/config"
|
"git.maximotejeda.com/maximo/us_dop_scrapper/config"
|
||||||
"github.com/maximotejeda/us_dop_scrapper/helpers"
|
"git.maximotejeda.com/maximo/us_dop_scrapper/helpers"
|
||||||
"github.com/maximotejeda/us_dop_scrapper/internal/application/core/domain"
|
"git.maximotejeda.com/maximo/us_dop_scrapper/internal/application/core/domain"
|
||||||
"github.com/maximotejeda/us_dop_scrapper/internal/ports"
|
"git.maximotejeda.com/maximo/us_dop_scrapper/internal/ports"
|
||||||
"github.com/playwright-community/playwright-go"
|
"github.com/playwright-community/playwright-go"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@ -7,9 +7,9 @@ import (
|
|||||||
"strconv"
|
"strconv"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/maximotejeda/us_dop_scrapper/config"
|
"git.maximotejeda.com/maximo/us_dop_scrapper/config"
|
||||||
"github.com/maximotejeda/us_dop_scrapper/internal/application/core/domain"
|
"git.maximotejeda.com/maximo/us_dop_scrapper/internal/application/core/domain"
|
||||||
"github.com/maximotejeda/us_dop_scrapper/internal/ports"
|
"git.maximotejeda.com/maximo/us_dop_scrapper/internal/ports"
|
||||||
|
|
||||||
"github.com/playwright-community/playwright-go"
|
"github.com/playwright-community/playwright-go"
|
||||||
)
|
)
|
||||||
|
|||||||
@ -3,7 +3,7 @@ package crawler
|
|||||||
import (
|
import (
|
||||||
"fmt"
|
"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) {
|
func Selector(who string, client ports.DollarPort) (ports.APIPorts, error) {
|
||||||
|
|||||||
@ -6,10 +6,10 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/maximotejeda/us_dop_scrapper/config"
|
"git.maximotejeda.com/maximo/us_dop_scrapper/config"
|
||||||
"github.com/maximotejeda/us_dop_scrapper/helpers"
|
"git.maximotejeda.com/maximo/us_dop_scrapper/helpers"
|
||||||
"github.com/maximotejeda/us_dop_scrapper/internal/application/core/domain"
|
"git.maximotejeda.com/maximo/us_dop_scrapper/internal/application/core/domain"
|
||||||
"github.com/maximotejeda/us_dop_scrapper/internal/ports"
|
"git.maximotejeda.com/maximo/us_dop_scrapper/internal/ports"
|
||||||
"github.com/playwright-community/playwright-go"
|
"github.com/playwright-community/playwright-go"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@ -7,10 +7,10 @@ import (
|
|||||||
|
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/maximotejeda/us_dop_scrapper/config"
|
"git.maximotejeda.com/maximo/us_dop_scrapper/config"
|
||||||
"github.com/maximotejeda/us_dop_scrapper/helpers"
|
"git.maximotejeda.com/maximo/us_dop_scrapper/helpers"
|
||||||
"github.com/maximotejeda/us_dop_scrapper/internal/application/core/domain"
|
"git.maximotejeda.com/maximo/us_dop_scrapper/internal/application/core/domain"
|
||||||
"github.com/maximotejeda/us_dop_scrapper/internal/ports"
|
"git.maximotejeda.com/maximo/us_dop_scrapper/internal/ports"
|
||||||
"github.com/playwright-community/playwright-go"
|
"github.com/playwright-community/playwright-go"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@ -5,10 +5,10 @@ import (
|
|||||||
"log/slog"
|
"log/slog"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/maximotejeda/us_dop_scrapper/config"
|
"git.maximotejeda.com/maximo/us_dop_scrapper/config"
|
||||||
"github.com/maximotejeda/us_dop_scrapper/helpers"
|
"git.maximotejeda.com/maximo/us_dop_scrapper/helpers"
|
||||||
"github.com/maximotejeda/us_dop_scrapper/internal/application/core/domain"
|
"git.maximotejeda.com/maximo/us_dop_scrapper/internal/application/core/domain"
|
||||||
"github.com/maximotejeda/us_dop_scrapper/internal/ports"
|
"git.maximotejeda.com/maximo/us_dop_scrapper/internal/ports"
|
||||||
"github.com/playwright-community/playwright-go"
|
"github.com/playwright-community/playwright-go"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@ -4,7 +4,7 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
|
|
||||||
dl "git.maximotejeda.com/maximo/dolar/proto/golang/dolar"
|
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"
|
"google.golang.org/grpc"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -14,7 +14,7 @@ type Adapter struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func NewAdapter(conn *grpc.ClientConn) (*Adapter, error) {
|
func NewAdapter(conn *grpc.ClientConn) (*Adapter, error) {
|
||||||
client := dolar.NewDollarClient(conn)
|
client := dl.NewDollarClient(conn)
|
||||||
return &Adapter{dolar: client, conn: conn}, nil
|
return &Adapter{dolar: client, conn: conn}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -6,8 +6,8 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/maximotejeda/us_dop_scrapper/helpers"
|
"git.maximotejeda.com/maximo/us_dop_scrapper/helpers"
|
||||||
"github.com/maximotejeda/us_dop_scrapper/internal/ports"
|
"git.maximotejeda.com/maximo/us_dop_scrapper/internal/ports"
|
||||||
"github.com/playwright-community/playwright-go"
|
"github.com/playwright-community/playwright-go"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@ -4,7 +4,7 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"log/slog"
|
"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"
|
"github.com/playwright-community/playwright-go"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
package ports
|
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 {
|
type DollarPort interface {
|
||||||
NewHistory(*domain.History) error
|
NewHistory(*domain.History) error
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user