Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrNoSuchBooking = errors.New("no such booking")
)
Functions ¶
This section is empty.
Types ¶
type BookCarRentalRequest ¶
type BookCarRentalRequest struct { Agent string `json:"agent"` PickUp time.Time `json:"pick_up"` PickUpLocation string `json:"pick_up_location"` DropOff time.Time `json:"drop_off"` DropOffLocation string `json:"drop_off_location"` Name string `json:"name"` VehicleClass string `json:"vehicle_class"` }
func (*BookCarRentalRequest) Validate ¶
func (b *BookCarRentalRequest) Validate() error
type CarRentalConfirmation ¶
type CarRentalConfirmation struct { Ref string `json:"ref"` CarRental *BookCarRentalRequest `json:"car_rental"` }
type CarRentalService ¶
type CarRentalService interface { BookCarRental(context.Context, *BookCarRentalRequest) (*CarRentalConfirmation, error) GetBooking(ctx context.Context, ref string) (*CarRentalConfirmation, error) }
func NewCarRentalService ¶
func NewCarRentalService() (CarRentalService, error)
Click to show internal directories.
Click to hide internal directories.