Documentation ¶
Index ¶
- type PostgresRepository
- func (r *PostgresRepository) CreateGood(ctx context.Context, param barter.Good) (*barter.Good, common.Error)
- func (r *PostgresRepository) CreateTrader(ctx context.Context, param barter.Trader) (*barter.Trader, common.Error)
- func (r *PostgresRepository) DeleteGoodByID(ctx context.Context, id int) common.Error
- func (r *PostgresRepository) GetGoodByID(ctx context.Context, id int) (*barter.Good, common.Error)
- func (r *PostgresRepository) GetTraderByEmail(ctx context.Context, email string) (*barter.Trader, common.Error)
- func (r *PostgresRepository) ListGoods(ctx context.Context) ([]barter.Good, common.Error)
- func (r *PostgresRepository) ListGoodsByOwner(ctx context.Context, ownerID int) ([]barter.Good, common.Error)
- func (r *PostgresRepository) UpdateGood(ctx context.Context, good barter.Good) (updatedGood *barter.Good, err common.Error)
- func (r *PostgresRepository) UpdateGoods(ctx context.Context, goods []barter.Good) (updatedGoods []barter.Good, err common.Error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PostgresRepository ¶
type PostgresRepository struct {
// contains filtered or unexported fields
}
func NewPostgresRepository ¶
func NewPostgresRepository(ctx context.Context, db *sqlx.DB) *PostgresRepository
func (*PostgresRepository) CreateGood ¶
func (*PostgresRepository) CreateTrader ¶
func (*PostgresRepository) DeleteGoodByID ¶
func (*PostgresRepository) GetGoodByID ¶
func (*PostgresRepository) GetTraderByEmail ¶
func (*PostgresRepository) ListGoodsByOwner ¶
func (*PostgresRepository) UpdateGood ¶
Click to show internal directories.
Click to hide internal directories.