Skip to content

Commit

Permalink
try again?
Browse files Browse the repository at this point in the history
  • Loading branch information
phendryx committed May 22, 2024
1 parent dcac14e commit eb55f4c
Show file tree
Hide file tree
Showing 9 changed files with 34 additions and 18 deletions.
7 changes: 4 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
#FROM ubuntu:latest
FROM golang:1.16.6-buster

WORKDIR /usr/src/app


RUN apt-get update
RUN apt-get install -y make sudo nsis ca-certificates openssl

RUN mkdir -p /go/src/github.com/ao-data/albiondata-client

COPY ./ /go/src/github.com/ao-data/albiondata-client

RUN mkdir -p /go/src/github.com/ao-data/albiondata-client
WORKDIR /go/src/github.com/ao-data/albiondata-client
COPY . .
6 changes: 3 additions & 3 deletions client/operation_auction_get_item_average_stats.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (

"github.com/ao-data/albiondata-client/lib"
"github.com/ao-data/albiondata-client/log"
"github.com/google/uuid"
uuid "github.com/nu7hatch/gouuid"
)

type operationAuctionGetItemAverageStats struct {
Expand Down Expand Up @@ -89,15 +89,15 @@ func (op operationAuctionGetItemAverageStatsResponse) Process(state *albionState
return histories[i].Timestamp > histories[j].Timestamp
})

identifier, _ := uuid.NewRandom()
identifier, _ := uuid.NewV4()

upload := lib.MarketHistoriesUpload{
AlbionId: mhInfo.albionId,
LocationId: state.LocationId,
QualityLevel: mhInfo.quality,
Timescale: mhInfo.timescale,
Histories: histories,
Identifier: identifier.String(),
Identifier: identifier.String(),
}

log.Infof("Sending %d market history item average stats to ingest for albionID %d (Identifier: %s)", len(histories), mhInfo.albionId, identifier)
Expand Down
6 changes: 3 additions & 3 deletions client/operation_auction_get_offers.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (

"github.com/ao-data/albiondata-client/lib"
"github.com/ao-data/albiondata-client/log"
"github.com/google/uuid"
uuid "github.com/nu7hatch/gouuid"
)

type operationAuctionGetOffers struct {
Expand Down Expand Up @@ -53,10 +53,10 @@ func (op operationAuctionGetOffersResponse) Process(state *albionState) {
return
}

identifier, _ := uuid.NewRandom()
identifier, _ := uuid.NewV4()

upload := lib.MarketUpload{
Orders: orders,
Orders: orders,
Identifier: identifier.String(),
}

Expand Down
6 changes: 3 additions & 3 deletions client/operation_auction_get_requests.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (

"github.com/ao-data/albiondata-client/lib"
"github.com/ao-data/albiondata-client/log"
"github.com/google/uuid"
uuid "github.com/nu7hatch/gouuid"
)

type operationAuctionGetRequestsResponse struct {
Expand Down Expand Up @@ -37,10 +37,10 @@ func (op operationAuctionGetRequestsResponse) Process(state *albionState) {
return
}

identifier, _ := uuid.NewRandom()
identifier, _ := uuid.NewV4()

upload := lib.MarketUpload{
Orders: orders,
Orders: orders,
Identifier: identifier.String(),
}

Expand Down
4 changes: 2 additions & 2 deletions client/operation_gold_market_get_average_info.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package client
import (
"github.com/ao-data/albiondata-client/lib"
"github.com/ao-data/albiondata-client/log"
"github.com/google/uuid"
uuid "github.com/nu7hatch/gouuid"
)

type operationGoldMarketGetAverageInfo struct {
Expand All @@ -21,7 +21,7 @@ type operationGoldMarketGetAverageInfoResponse struct {
func (op operationGoldMarketGetAverageInfoResponse) Process(state *albionState) {
log.Debug("Got response to GoldMarketGetAverageInfo operation...")

identifier, _ := uuid.NewRandom()
identifier, _ := uuid.NewV4()

upload := lib.GoldPricesUpload{
Prices: op.GoldPrices,
Expand Down
14 changes: 14 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
version: "3.5"

services:
builder:
# image: golang:1.16.6-buster
platform: linux/amd64
build:
context: ./
volumes:
- .:/go/src/github.com/ao-data/albiondata-client
stdin_open: true
tty: true
entrypoint: 'sleep infinity'

3 changes: 1 addition & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,12 @@ require (
github.com/fsnotify/fsnotify v1.4.9 // indirect
github.com/getlantern/golog v0.0.0-20201022140317-a8d13dc71777 // indirect
github.com/getlantern/ops v0.0.0-20200403153110-8476b16edcd6 // indirect
github.com/google/uuid v1.6.0
github.com/hashicorp/golang-lru v0.5.4 // indirect
github.com/magiconair/properties v1.8.4 // indirect
github.com/nats-io/gnatsd v1.4.1 // indirect
github.com/nats-io/nkeys v0.2.0 // indirect
github.com/nats-io/nuid v1.0.1 // indirect
github.com/nu7hatch/gouuid v0.0.0-20131221200532-179d4d0c4d8d // indirect
github.com/nu7hatch/gouuid v0.0.0-20131221200532-179d4d0c4d8d
github.com/pelletier/go-toml v1.8.1 // indirect
github.com/spf13/afero v1.4.1 // indirect
github.com/spf13/cast v1.3.1 // indirect
Expand Down
2 changes: 0 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,6 @@ github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXi
github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=
github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=
github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg=
github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk=
github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8=
Expand Down
4 changes: 4 additions & 0 deletions scripts/build-windows.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ go install github.com/tc-hib/go-winres@v0.3.1

export PATH="$PATH:/root/go/bin"

go mod init

go mod download

go-winres make

env GOOS=windows GOARCH=amd64 go build -ldflags "-s -w -X main.version=$GITHUB_REF_NAME" -o albiondata-client.exe -v -x albiondata-client.go
Expand Down

0 comments on commit eb55f4c

Please sign in to comment.