Documentation
¶
Index ¶
- type BookingStore
- func (s BookingStore) CreateBooking(ctx context.Context, bookingReq models.BookingRequest, totalAmount float64) (models.Booking, error)
- func (s BookingStore) DeleteBooking(ctx context.Context, id string) (models.Booking, error)
- func (s BookingStore) GetAllBookings(ctx context.Context) ([]models.Booking, error)
- func (s BookingStore) GetBookingByID(ctx context.Context, id string) (models.Booking, error)
- func (s BookingStore) GetBookingsByCarID(ctx context.Context, carID string) ([]models.Booking, error)
- func (s BookingStore) GetBookingsByCustomerID(ctx context.Context, customerID string) ([]models.Booking, error)
- func (s BookingStore) GetBookingsByOwnerID(ctx context.Context, ownerID string) ([]models.Booking, error)
- func (s BookingStore) UpdateBookingStatus(ctx context.Context, id string, status models.BookingStatus) (models.Booking, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BookingStore ¶
type BookingStore struct {
// contains filtered or unexported fields
}
func New ¶
func New(db *sql.DB) BookingStore
func (BookingStore) CreateBooking ¶
func (s BookingStore) CreateBooking(ctx context.Context, bookingReq models.BookingRequest, totalAmount float64) (models.Booking, error)
func (BookingStore) DeleteBooking ¶
func (BookingStore) GetAllBookings ¶
func (BookingStore) GetBookingByID ¶
func (BookingStore) GetBookingsByCarID ¶
func (BookingStore) GetBookingsByCustomerID ¶
func (BookingStore) GetBookingsByOwnerID ¶
func (BookingStore) UpdateBookingStatus ¶
func (s BookingStore) UpdateBookingStatus(ctx context.Context, id string, status models.BookingStatus) (models.Booking, error)
Click to show internal directories.
Click to hide internal directories.