deleted some code
ci.vdhsn.com/push Build is failing Details

feat/kafka
Adam Veldhousen 11 months ago
parent 865a8c670d
commit 3954a7a2c6
Signed by: adam
GPG Key ID: 6DB29003C6DD1E4B

@ -188,11 +188,11 @@ k8s_resource(
bh_backend_service(service="runner", migrateDB=True, port_forwards=[
port_forward(2345, name='Delve port')
])
], deps=["postgres", "kafka"])
bh_backend_service(service="catalog", migrateDB=True, port_forwards=[
port_forward(2346, 2345, name='Delve port')
], deps=["postgres"])
], deps=["postgres", "kafka"])
bh_backend_service(service="proxy-admin", port_forwards=[
port_forward(8082, 80, name="HTTP API @ localhost:8082")

@ -9,5 +9,5 @@ deps:
- remote: buf.build
owner: grpc-ecosystem
repository: grpc-gateway
commit: a1ecdc58eccd49aa8bea2a7a9022dc27
digest: shake256:efdd86fbdc42e8b7259fe461a49656827a03fb7cba0b3b9eb622ca10654ec6beccb9a051229c1553ccd89ed3e95d69ad4d7c799f1da3f3f1bd447b7947a4893e
commit: 11c9972ea0fd4c95a2c38d29bb1dc817
digest: shake256:9c7ce822dff52ad28714465396fbe98e879409677a61687b7dd9bb3d1484aa5d1704c013698b24f34c5d51023dbff47287ecd9676271953c25e646b42ebb76c5

@ -1,54 +1,9 @@
package api
import (
"context"
"time"
capi "git.vdhsn.com/barretthousen/barretthousen/src/catalog/api/grpc"
"google.golang.org/grpc"
"google.golang.org/protobuf/types/known/timestamppb"
)
func NewCatalogServiceClient(conn grpc.ClientConnInterface) *CatalogServiceClient {
return &CatalogServiceClient{
CatalogClient: capi.NewCatalogClient(conn),
}
}
type CatalogServiceClient struct {
capi.CatalogClient
}
type AuctionCreatedEvent struct {
Fingerprint string
ID int
Duplicate bool
}
func (css *CatalogServiceClient) UpdateUpcomingAuction(ctx context.Context, a Auction) (AuctionCreatedEvent, error) {
ac, err := css.ImportAuction(ctx, &capi.ImportAuctionMessage{
Items: int32(a.ItemCount),
Start: timestamppb.New(a.Start),
End: timestamppb.New(a.End),
Title: a.Title,
Description: a.Description,
SourceSiteURL: a.Source.SiteURL,
SourceSiteName: a.Source.Name,
SourceURL: a.Source.AuctionURL,
Country: a.Address.CountryCode,
Province: a.Address.State,
})
if err != nil {
return AuctionCreatedEvent{}, err
}
return AuctionCreatedEvent{
Fingerprint: ac.Auction.Fingerprint,
ID: int(ac.Auction.Id),
Duplicate: ac.Duplicate,
}, nil
}
type Auction struct {
ID int `json:"id,omitempty"`
Fingerprint string `json:"fingerprint,omitempty"`

Loading…
Cancel
Save