Documentation
¶
Index ¶
- func NewConnection(config config.Config) (*sql.DB, error)
- type BidRepo
- func (r *BidRepo) AwardBidByTenderID(ctx context.Context, clientID, tenderID, bidID uuid.UUID) error
- func (r *BidRepo) Create(ctx context.Context, bid *models.Bid) error
- func (r *BidRepo) DeleteByContractorID(ctx context.Context, contractorID, bidID uuid.UUID) error
- func (r *BidRepo) GetByID(ctx context.Context, id uuid.UUID) (*models.Bid, error)
- func (r *BidRepo) ListByClientTenderID(ctx context.Context, clientID, tenderID uuid.UUID) ([]models.Bid, error)
- func (r *BidRepo) ListByContractorID(ctx context.Context, contractorID uuid.UUID) ([]models.Bid, error)
- func (r *BidRepo) ListByTenderID(ctx context.Context, tenderID uuid.UUID, filters repository.BidFilters) ([]models.Bid, error)
- func (r *BidRepo) ListByTenderIDWithFilters(ctx context.Context, tenderID uuid.UUID, filters repository.BidFilters) ([]models.Bid, error)
- func (r *BidRepo) Update(ctx context.Context, bid *models.Bid) error
- type HistoryRepo
- type NotificationRepo
- type TenderRepo
- func (r *TenderRepo) Create(ctx context.Context, tender *models.Tender) error
- func (r *TenderRepo) Delete(ctx context.Context, id uuid.UUID) error
- func (r *TenderRepo) GetByID(ctx context.Context, id uuid.UUID) (*models.Tender, error)
- func (r *TenderRepo) GetClientIDByTenderID(ctx context.Context, tenderID uuid.UUID) (uuid.UUID, error)
- func (r *TenderRepo) List(ctx context.Context, filters repository.TenderFilters) ([]models.Tender, error)
- func (r *TenderRepo) ListByClientID(ctx context.Context, clientID uuid.UUID) ([]models.Tender, error)
- func (r *TenderRepo) UpdateStatus(ctx context.Context, id uuid.UUID, status string) error
- type UserRepo
- func (r *UserRepo) Create(ctx context.Context, user *models.User) error
- func (r *UserRepo) ExistsByEmail(ctx context.Context, email string) (bool, error)
- func (r *UserRepo) GetByEmail(ctx context.Context, email string) (*models.User, error)
- func (r *UserRepo) GetByID(ctx context.Context, id uuid.UUID) (*models.User, error)
- func (r *UserRepo) GetByUsername(ctx context.Context, username string) (*models.User, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BidRepo ¶
type BidRepo struct {
// contains filtered or unexported fields
}
func NewBidRepo ¶
func (*BidRepo) AwardBidByTenderID ¶
func (*BidRepo) DeleteByContractorID ¶
func (*BidRepo) ListByClientTenderID ¶
func (*BidRepo) ListByContractorID ¶
func (*BidRepo) ListByTenderID ¶
func (r *BidRepo) ListByTenderID(ctx context.Context, tenderID uuid.UUID, filters repository.BidFilters) ([]models.Bid, error)
func (*BidRepo) ListByTenderIDWithFilters ¶
func (r *BidRepo) ListByTenderIDWithFilters(ctx context.Context, tenderID uuid.UUID, filters repository.BidFilters) ([]models.Bid, error)
type HistoryRepo ¶
type HistoryRepo struct {
// contains filtered or unexported fields
}
Tender represents a tender history entry.
func NewHistoryRepo ¶
func NewHistoryRepo(db *sql.DB) *HistoryRepo
NewHistoryRepo creates a new instance of HistoryRepo.
func (*HistoryRepo) GetBidHistory ¶
GetBidHistory retrieves the bid history for a specific contractor.
func (*HistoryRepo) GetTenderHistory ¶
GetTenderHistory retrieves the tender history for a specific user.
type NotificationRepo ¶
type NotificationRepo struct {
// contains filtered or unexported fields
}
func NewNotificationRepo ¶
func NewNotificationRepo(db *sql.DB) *NotificationRepo
func (*NotificationRepo) Create ¶
func (r *NotificationRepo) Create(ctx context.Context, notification *models.Notification) error
func (*NotificationRepo) ListByUserID ¶
func (r *NotificationRepo) ListByUserID(ctx context.Context, userID uuid.UUID) ([]models.Notification, error)
func (*NotificationRepo) MarkAsRead ¶
type TenderRepo ¶
type TenderRepo struct {
// contains filtered or unexported fields
}
func NewTenderRepo ¶
func NewTenderRepo(db *sql.DB, redisClient *redis.Client) *TenderRepo
func (*TenderRepo) GetClientIDByTenderID ¶
func (*TenderRepo) List ¶
func (r *TenderRepo) List(ctx context.Context, filters repository.TenderFilters) ([]models.Tender, error)
func (*TenderRepo) ListByClientID ¶
func (*TenderRepo) UpdateStatus ¶
type UserRepo ¶
type UserRepo struct {
// contains filtered or unexported fields
}
func NewUserRepo ¶
func (*UserRepo) ExistsByEmail ¶
func (*UserRepo) GetByEmail ¶
Click to show internal directories.
Click to hide internal directories.