Add gRPC server implementation and database integration for marketplace and products

This commit is contained in:
2025-05-27 03:41:52 +03:00
parent 008f3df42d
commit b083cccc09
44 changed files with 2182 additions and 1201 deletions

View File

@@ -0,0 +1,28 @@
// Code generated by sqlc. DO NOT EDIT.
// versions:
// sqlc v1.28.0
// source: query.sql
package db
import (
"context"
)
const getMarketplaceByID = `-- name: GetMarketplaceByID :one
SELECT id, base_marketplace, name, auth_data, warehouse_id FROM marketplaces
WHERE id = $1 LIMIT 1
`
func (q *Queries) GetMarketplaceByID(ctx context.Context, id int32) (Marketplace, error) {
row := q.db.QueryRow(ctx, getMarketplaceByID, id)
var i Marketplace
err := row.Scan(
&i.ID,
&i.BaseMarketplace,
&i.Name,
&i.AuthData,
&i.WarehouseID,
)
return i, err
}