Documentation
¶
Index ¶
- type PostgresOutput
- func (p *PostgresOutput) BatchInsertDeliveryPartners(partners []*models.DeliveryPartner) error
- func (p *PostgresOutput) BatchInsertMenuItems(menuItems []*models.MenuItem) error
- func (p *PostgresOutput) BatchInsertOrdersTx(tx *sql.Tx, orders []*models.Order) error
- func (p *PostgresOutput) BatchInsertRestaurants(restaurants []*models.Restaurant) error
- func (p *PostgresOutput) BatchInsertUsers(users []*models.User) error
- func (p *PostgresOutput) BatchUpdateDeliveryPartnerLocations(updates []models.PartnerLocationUpdate) error
- func (p *PostgresOutput) BatchUpdateMenuItemPrices(updates map[string]float64) error
- func (p *PostgresOutput) BeginTx() (*sql.Tx, error)
- func (p *PostgresOutput) BeginTxContext(ctx context.Context) (*sql.Tx, error)
- func (p *PostgresOutput) Close() error
- func (p *PostgresOutput) ExecTx(fn func(*sql.Tx) error) error
- func (p *PostgresOutput) ExecTxContext(ctx context.Context, fn func(*sql.Tx) error) error
- func (p *PostgresOutput) ExecTxWithRetry(fn func(*sql.Tx) error, maxRetries int) error
- func (p *PostgresOutput) GetMenuItemsByRestaurant(restaurantID string) ([]*models.MenuItem, error)
- func (p *PostgresOutput) GetNearbyDeliveryPartners(loc models.Location, radius float64) ([]*models.DeliveryPartner, error)
- func (p *PostgresOutput) GetPopularMenuItems(limit int) ([]*models.MenuItem, error)
- func (p *PostgresOutput) UpdateRestaurantOrderCountsTx(tx *sql.Tx, orders []*models.Order) error
- func (p *PostgresOutput) UpdateUserOrderCountsTx(tx *sql.Tx, orders []*models.Order) error
- func (p *PostgresOutput) WriteMessage(topic string, msg []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PostgresOutput ¶
type PostgresOutput struct {
// contains filtered or unexported fields
}
func NewPostgresOutput ¶
func NewPostgresOutput(config *models.DatabaseConfig) (*PostgresOutput, error)
func (*PostgresOutput) BatchInsertDeliveryPartners ¶
func (p *PostgresOutput) BatchInsertDeliveryPartners(partners []*models.DeliveryPartner) error
func (*PostgresOutput) BatchInsertMenuItems ¶
func (p *PostgresOutput) BatchInsertMenuItems(menuItems []*models.MenuItem) error
func (*PostgresOutput) BatchInsertOrdersTx ¶
func (*PostgresOutput) BatchInsertRestaurants ¶
func (p *PostgresOutput) BatchInsertRestaurants(restaurants []*models.Restaurant) error
func (*PostgresOutput) BatchInsertUsers ¶
func (p *PostgresOutput) BatchInsertUsers(users []*models.User) error
func (*PostgresOutput) BatchUpdateDeliveryPartnerLocations ¶
func (p *PostgresOutput) BatchUpdateDeliveryPartnerLocations(updates []models.PartnerLocationUpdate) error
func (*PostgresOutput) BatchUpdateMenuItemPrices ¶
func (p *PostgresOutput) BatchUpdateMenuItemPrices(updates map[string]float64) error
func (*PostgresOutput) BeginTxContext ¶
func (*PostgresOutput) Close ¶
func (p *PostgresOutput) Close() error
func (*PostgresOutput) ExecTxContext ¶
func (*PostgresOutput) ExecTxWithRetry ¶
func (*PostgresOutput) GetMenuItemsByRestaurant ¶
func (p *PostgresOutput) GetMenuItemsByRestaurant(restaurantID string) ([]*models.MenuItem, error)
func (*PostgresOutput) GetNearbyDeliveryPartners ¶
func (p *PostgresOutput) GetNearbyDeliveryPartners(loc models.Location, radius float64) ([]*models.DeliveryPartner, error)
func (*PostgresOutput) GetPopularMenuItems ¶
func (p *PostgresOutput) GetPopularMenuItems(limit int) ([]*models.MenuItem, error)
func (*PostgresOutput) UpdateRestaurantOrderCountsTx ¶
func (*PostgresOutput) UpdateUserOrderCountsTx ¶
func (*PostgresOutput) WriteMessage ¶
func (p *PostgresOutput) WriteMessage(topic string, msg []byte) error
Click to show internal directories.
Click to hide internal directories.