Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrNoSuchBooking = errors.New("no such booking")
)
Functions ¶
This section is empty.
Types ¶
type BookTripRequest ¶
type BookTripRequest struct { Name string `json:"name"` TripName string `json:"trip_name"` Destination string `json:"destination"` Start time.Time `json:"start"` End time.Time `json:"end"` Members []string `json:"members"` Flight *flights.BookFlightRequest `json:"flight,omitempty"` Hotel *hotels.BookHotelRequest `json:"hotel,omitempty"` Car *cars.BookCarRentalRequest `json:"car,omitempty"` }
func (*BookTripRequest) Validate ¶
func (b *BookTripRequest) Validate() error
type TripBooking ¶
type TripConfirmation ¶
type TripConfirmation struct { Ref string `json:"ref"` Trip *BookTripRequest `json:"trip"` FlightConfirmation *flights.FlightConfirmation `json:"flight_confirmation,omitempty"` HotelConfirmation *hotels.HotelConfirmation `json:"hotel_confirmation,omitempty"` CarRentalConfirmation *cars.CarRentalConfirmation `json:"car_rental_confirmation,omitempty"` }
type TripService ¶
type TripService interface { BookTrip(context.Context, *BookTripRequest) (*TripConfirmation, error) GetBooking(ctx context.Context, ref string) (*TripConfirmation, error) }
func NewTripService ¶
func NewTripService() (TripService, error)
Click to show internal directories.
Click to hide internal directories.