Documentation ¶
Index ¶
- type BookingRepository
- func (r *BookingRepository) CreateBooking(ctx context.Context, booking *models.Booking) (*models.Booking, error)
- func (r *BookingRepository) DeleteBooking(ctx context.Context, id string) error
- func (r *BookingRepository) GetBookingByID(ctx context.Context, id string) (*models.Booking, error)
- func (r *BookingRepository) GetBookingsPaginated(ctx context.Context, afterCursor string, limit int) ([]models.Booking, string, error)
- func (r *BookingRepository) GetDestinationById(ctx context.Context, id string) (*models.Destination, error)
- func (r *BookingRepository) GetFlights(ctx context.Context, filters map[string]interface{}) ([]models.Flight, error)
- func (r *BookingRepository) IsLaunchPadWeekAvailable(ctx context.Context, launchpadId, destinationId string, t time.Time) (bool, error)
- type DBConn
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BookingRepository ¶
type BookingRepository struct {
// contains filtered or unexported fields
}
func NewBookingRepository ¶
func NewBookingRepository(db DBConn) *BookingRepository
func (*BookingRepository) CreateBooking ¶
func (*BookingRepository) DeleteBooking ¶
func (r *BookingRepository) DeleteBooking(ctx context.Context, id string) error
func (*BookingRepository) GetBookingByID ¶
func (*BookingRepository) GetBookingsPaginated ¶
func (*BookingRepository) GetDestinationById ¶
func (r *BookingRepository) GetDestinationById(ctx context.Context, id string) (*models.Destination, error)
func (*BookingRepository) GetFlights ¶
func (*BookingRepository) IsLaunchPadWeekAvailable ¶
type DBConn ¶
type DBConn interface { Begin(ctx context.Context) (pgx.Tx, error) Query(ctx context.Context, sql string, args ...interface{}) (pgx.Rows, error) QueryRow(ctx context.Context, sql string, args ...interface{}) pgx.Row Exec(ctx context.Context, sql string, arguments ...interface{}) (pgconn.CommandTag, error) }
Click to show internal directories.
Click to hide internal directories.