Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrNoSuchBooking = errors.New("no such booking")
)
Functions ¶
This section is empty.
Types ¶
type BookHotelRequest ¶
type BookHotelRequest struct { Hotel string `json:"hotel"` CheckIn time.Time `json:"check_in"` CheckOut time.Time `json:"check_out"` Name string `json:"name"` Guests int `json:"guests"` }
func (*BookHotelRequest) Validate ¶
func (b *BookHotelRequest) Validate() error
type HotelConfirmation ¶
type HotelConfirmation struct { Ref string `json:"ref"` Hotel *BookHotelRequest `json:"hotel"` }
type HotelService ¶
type HotelService interface { BookHotel(context.Context, *BookHotelRequest) (*HotelConfirmation, error) GetBooking(ctx context.Context, ref string) (*HotelConfirmation, error) }
func NewHotelService ¶
func NewHotelService() (HotelService, error)
Click to show internal directories.
Click to hide internal directories.