Documentation ¶
Index ¶
- Constants
- Variables
- func MakeBadRequest(err error) *goa.ServiceError
- func MakeClientClosedRequest(err error) *goa.ServiceError
- func MakeConflict(err error) *goa.ServiceError
- func MakeForbidden(err error) *goa.ServiceError
- func MakeGatewayTimeout(err error) *goa.ServiceError
- func MakeInternalServerError(err error) *goa.ServiceError
- func MakeNotFound(err error) *goa.ServiceError
- func MakeNotImplemented(err error) *goa.ServiceError
- func MakeServiceUnavailable(err error) *goa.ServiceError
- func MakeTooManyRequests(err error) *goa.ServiceError
- func MakeUnauthorized(err error) *goa.ServiceError
- func NewBatchAvailabilityLookupEndpoint(s Service, authBasicFn security.AuthBasicFunc) goa.Endpoint
- func NewCheckAvailabilityEndpoint(s Service, authBasicFn security.AuthBasicFunc) goa.Endpoint
- func NewCreateBookingEndpoint(s Service, authBasicFn security.AuthBasicFunc) goa.Endpoint
- func NewGetBookingStatusEndpoint(s Service, authBasicFn security.AuthBasicFunc) goa.Endpoint
- func NewListBookingsEndpoint(s Service, authBasicFn security.AuthBasicFunc) goa.Endpoint
- func NewUpdateBookingEndpoint(s Service, authBasicFn security.AuthBasicFunc) goa.Endpoint
- type Auther
- type AvailabilityUpdate
- type BatchAvailabilityLookupPayload
- type BatchAvailabilityLookupRequest
- type BatchAvailabilityLookupResponse
- type Booking
- type BookingFailure
- type CardNetworkParameters
- type CheckAvailabilityPayload
- type CheckAvailabilityRequest
- type CheckAvailabilityResponse
- type Client
- func (c *Client) BatchAvailabilityLookup(ctx context.Context, p *BatchAvailabilityLookupPayload) (res *BatchAvailabilityLookupResponse, err error)
- func (c *Client) CheckAvailability(ctx context.Context, p *CheckAvailabilityPayload) (res *CheckAvailabilityResponse, err error)
- func (c *Client) CreateBooking(ctx context.Context, p *CreateBookingPayload) (res *CreateBookingResponse, err error)
- func (c *Client) GetBookingStatus(ctx context.Context, p *GetBookingStatusPayload) (res *GetBookingStatusResponse, err error)
- func (c *Client) ListBookings(ctx context.Context, p *ListBookingsPayload) (res *ListBookingsResponse, err error)
- func (c *Client) UpdateBooking(ctx context.Context, p *UpdateBookingPayload) (res *UpdateBookingResponse, err error)
- type CreateBookingPayload
- type CreateBookingRequest
- type CreateBookingResponse
- type Deposit
- type Endpoints
- type GetBookingStatusPayload
- type GetBookingStatusRequest
- type GetBookingStatusResponse
- type LeaseReference
- type ListBookingsPayload
- type ListBookingsRequest
- type ListBookingsResponse
- type NoShowFee
- type OfferInfo
- type PaymentFailureInformation
- type PaymentInformation
- type PaymentProcessingParameters
- type PostalAddress
- type Price
- type ResourceIds
- type Service
- type Slot
- type SlotAvailability
- type SlotTime
- type SlotTimeAvailability
- type ThreeDS1Parameters
- type TokenizationConfig
- type UpdateBookingPayload
- type UpdateBookingRequest
- type UpdateBookingResponse
- type UserInformation
- type UserPaymentOption
- type VirtualSessionInfo
Constants ¶
const ServiceName = "booking"
ServiceName is the name of the service as defined in the design. This is the same value that is set in the endpoint request contexts under the ServiceKey key.
Variables ¶
var MethodNames = [6]string{"batch_availability_lookup", "check_availability", "create_booking", "update_booking", "get_booking_status", "list_bookings"}
MethodNames lists the service method names as defined in the design. These are the same values that are set in the endpoint request contexts under the MethodKey key.
Functions ¶
func MakeBadRequest ¶
func MakeBadRequest(err error) *goa.ServiceError
MakeBadRequest builds a goa.ServiceError from an error.
func MakeClientClosedRequest ¶
func MakeClientClosedRequest(err error) *goa.ServiceError
MakeClientClosedRequest builds a goa.ServiceError from an error.
func MakeConflict ¶
func MakeConflict(err error) *goa.ServiceError
MakeConflict builds a goa.ServiceError from an error.
func MakeForbidden ¶
func MakeForbidden(err error) *goa.ServiceError
MakeForbidden builds a goa.ServiceError from an error.
func MakeGatewayTimeout ¶
func MakeGatewayTimeout(err error) *goa.ServiceError
MakeGatewayTimeout builds a goa.ServiceError from an error.
func MakeInternalServerError ¶
func MakeInternalServerError(err error) *goa.ServiceError
MakeInternalServerError builds a goa.ServiceError from an error.
func MakeNotFound ¶
func MakeNotFound(err error) *goa.ServiceError
MakeNotFound builds a goa.ServiceError from an error.
func MakeNotImplemented ¶
func MakeNotImplemented(err error) *goa.ServiceError
MakeNotImplemented builds a goa.ServiceError from an error.
func MakeServiceUnavailable ¶
func MakeServiceUnavailable(err error) *goa.ServiceError
MakeServiceUnavailable builds a goa.ServiceError from an error.
func MakeTooManyRequests ¶
func MakeTooManyRequests(err error) *goa.ServiceError
MakeTooManyRequests builds a goa.ServiceError from an error.
func MakeUnauthorized ¶
func MakeUnauthorized(err error) *goa.ServiceError
MakeUnauthorized builds a goa.ServiceError from an error.
func NewBatchAvailabilityLookupEndpoint ¶
func NewBatchAvailabilityLookupEndpoint(s Service, authBasicFn security.AuthBasicFunc) goa.Endpoint
NewBatchAvailabilityLookupEndpoint returns an endpoint function that calls the method "batch_availability_lookup" of service "booking".
func NewCheckAvailabilityEndpoint ¶
func NewCheckAvailabilityEndpoint(s Service, authBasicFn security.AuthBasicFunc) goa.Endpoint
NewCheckAvailabilityEndpoint returns an endpoint function that calls the method "check_availability" of service "booking".
func NewCreateBookingEndpoint ¶
func NewCreateBookingEndpoint(s Service, authBasicFn security.AuthBasicFunc) goa.Endpoint
NewCreateBookingEndpoint returns an endpoint function that calls the method "create_booking" of service "booking".
func NewGetBookingStatusEndpoint ¶
func NewGetBookingStatusEndpoint(s Service, authBasicFn security.AuthBasicFunc) goa.Endpoint
NewGetBookingStatusEndpoint returns an endpoint function that calls the method "get_booking_status" of service "booking".
func NewListBookingsEndpoint ¶
func NewListBookingsEndpoint(s Service, authBasicFn security.AuthBasicFunc) goa.Endpoint
NewListBookingsEndpoint returns an endpoint function that calls the method "list_bookings" of service "booking".
func NewUpdateBookingEndpoint ¶
func NewUpdateBookingEndpoint(s Service, authBasicFn security.AuthBasicFunc) goa.Endpoint
NewUpdateBookingEndpoint returns an endpoint function that calls the method "update_booking" of service "booking".
Types ¶
type Auther ¶
type Auther interface { // BasicAuth implements the authorization logic for the Basic security scheme. BasicAuth(ctx context.Context, user, pass string, schema *security.BasicScheme) (context.Context, error) }
Auther defines the authorization functions to be implemented by the service.
type AvailabilityUpdate ¶
type AvailabilityUpdate struct {
SlotAvailability []*SlotAvailability
}
type BatchAvailabilityLookupPayload ¶
type BatchAvailabilityLookupPayload struct { Username string Password string Body *BatchAvailabilityLookupRequest }
BatchAvailabilityLookupPayload is the payload type of the booking service batch_availability_lookup method.
type BatchAvailabilityLookupResponse ¶
type BatchAvailabilityLookupResponse struct {
SlotTimeAvailability []*SlotTimeAvailability
}
BatchAvailabilityLookupResponse is the result type of the booking service batch_availability_lookup method.
type Booking ¶
type Booking struct { BookingID string Slot *Slot UserInformation *UserInformation Status *string PaymentInformation *PaymentInformation VirtualSessionInfo *VirtualSessionInfo OfferInfo *OfferInfo }
type BookingFailure ¶
type BookingFailure struct { Cause string RejectedCardType *string Description *string PaymentFailure *PaymentFailureInformation }
type CardNetworkParameters ¶
type CheckAvailabilityPayload ¶
type CheckAvailabilityPayload struct { Username string Password string Body *CheckAvailabilityRequest }
CheckAvailabilityPayload is the payload type of the booking service check_availability method.
type CheckAvailabilityRequest ¶
type CheckAvailabilityRequest struct {
Slot *Slot
}
type CheckAvailabilityResponse ¶
type CheckAvailabilityResponse struct { Slot *Slot CountAvailable int32 LastOnlineCancellableSec *string DurationRequirement *string AvailabilityUpdate *AvailabilityUpdate }
CheckAvailabilityResponse is the result type of the booking service check_availability method.
type Client ¶
type Client struct { BatchAvailabilityLookupEndpoint goa.Endpoint CheckAvailabilityEndpoint goa.Endpoint CreateBookingEndpoint goa.Endpoint UpdateBookingEndpoint goa.Endpoint GetBookingStatusEndpoint goa.Endpoint ListBookingsEndpoint goa.Endpoint }
Client is the "booking" service client.
func NewClient ¶
func NewClient(batchAvailabilityLookup, checkAvailability, createBooking, updateBooking, getBookingStatus, listBookings goa.Endpoint) *Client
NewClient initializes a "booking" service client given the endpoints.
func (*Client) BatchAvailabilityLookup ¶
func (c *Client) BatchAvailabilityLookup(ctx context.Context, p *BatchAvailabilityLookupPayload) (res *BatchAvailabilityLookupResponse, err error)
BatchAvailabilityLookup calls the "batch_availability_lookup" endpoint of the "booking" service.
func (*Client) CheckAvailability ¶
func (c *Client) CheckAvailability(ctx context.Context, p *CheckAvailabilityPayload) (res *CheckAvailabilityResponse, err error)
CheckAvailability calls the "check_availability" endpoint of the "booking" service.
func (*Client) CreateBooking ¶
func (c *Client) CreateBooking(ctx context.Context, p *CreateBookingPayload) (res *CreateBookingResponse, err error)
CreateBooking calls the "create_booking" endpoint of the "booking" service.
func (*Client) GetBookingStatus ¶
func (c *Client) GetBookingStatus(ctx context.Context, p *GetBookingStatusPayload) (res *GetBookingStatusResponse, err error)
GetBookingStatus calls the "get_booking_status" endpoint of the "booking" service.
func (*Client) ListBookings ¶
func (c *Client) ListBookings(ctx context.Context, p *ListBookingsPayload) (res *ListBookingsResponse, err error)
ListBookings calls the "list_bookings" endpoint of the "booking" service.
func (*Client) UpdateBooking ¶
func (c *Client) UpdateBooking(ctx context.Context, p *UpdateBookingPayload) (res *UpdateBookingResponse, err error)
UpdateBooking calls the "update_booking" endpoint of the "booking" service.
type CreateBookingPayload ¶
type CreateBookingPayload struct { Username string Password string Body *CreateBookingRequest }
CreateBookingPayload is the payload type of the booking service create_booking method.
type CreateBookingRequest ¶
type CreateBookingRequest struct { Slot *Slot LeaseRef *LeaseReference UserInformation *UserInformation PaymentInformation *PaymentInformation PaymentProcessingParameters *PaymentProcessingParameters IdempotencyToken string AdditionalRequest *string OfferID *string DealID *string }
type CreateBookingResponse ¶
type CreateBookingResponse struct { Booking *Booking UserPaymentOption *UserPaymentOption BookingFailure *BookingFailure }
CreateBookingResponse is the result type of the booking service create_booking method.
type Endpoints ¶
type Endpoints struct { BatchAvailabilityLookup goa.Endpoint CheckAvailability goa.Endpoint CreateBooking goa.Endpoint UpdateBooking goa.Endpoint GetBookingStatus goa.Endpoint ListBookings goa.Endpoint }
Endpoints wraps the "booking" service endpoints.
func NewEndpoints ¶
NewEndpoints wraps the methods of the "booking" service with endpoints.
type GetBookingStatusPayload ¶
type GetBookingStatusPayload struct { Username string Password string Body *GetBookingStatusRequest }
GetBookingStatusPayload is the payload type of the booking service get_booking_status method.
type GetBookingStatusRequest ¶
type GetBookingStatusRequest struct {
BookingID string
}
type GetBookingStatusResponse ¶
type GetBookingStatusResponse struct { BookingID string BookingStatus string PrepaymentStatus string }
GetBookingStatusResponse is the result type of the booking service get_booking_status method.
type LeaseReference ¶
type LeaseReference struct {
LeaseID string
}
type ListBookingsPayload ¶
type ListBookingsPayload struct { Username string Password string Body *ListBookingsRequest }
ListBookingsPayload is the payload type of the booking service list_bookings method.
type ListBookingsRequest ¶
type ListBookingsRequest struct {
UserID string
}
type ListBookingsResponse ¶
type ListBookingsResponse struct {
Bookings []*Booking
}
ListBookingsResponse is the result type of the booking service list_bookings method.
type PaymentFailureInformation ¶
type PaymentFailureInformation struct {
Threeds1Parameters *ThreeDS1Parameters
}
type PaymentInformation ¶
type PaymentInformation struct { PrepaymentStatus string PaymentTransactionID *string Price *Price TaxAmount *Price Fees *Price FeesAndTaxes *Price Deposit *Deposit NoShowFee *NoShowFee PaymentProcessedBy string PaymentOptionID *string UserPaymentOptionID *string FraudSignals *string PaResponse *string MdMerchantData *string }
type PostalAddress ¶
type ResourceIds ¶
type Service ¶
type Service interface { // BatchAvailabilityLookup implements batch_availability_lookup. BatchAvailabilityLookup(context.Context, *BatchAvailabilityLookupPayload) (res *BatchAvailabilityLookupResponse, err error) // CheckAvailability implements check_availability. CheckAvailability(context.Context, *CheckAvailabilityPayload) (res *CheckAvailabilityResponse, err error) // CreateBooking implements create_booking. CreateBooking(context.Context, *CreateBookingPayload) (res *CreateBookingResponse, err error) // UpdateBooking implements update_booking. UpdateBooking(context.Context, *UpdateBookingPayload) (res *UpdateBookingResponse, err error) // GetBookingStatus implements get_booking_status. GetBookingStatus(context.Context, *GetBookingStatusPayload) (res *GetBookingStatusResponse, err error) // ListBookings implements list_bookings. ListBookings(context.Context, *ListBookingsPayload) (res *ListBookingsResponse, err error) }
Service is the booking service interface.
type SlotAvailability ¶
type SlotTimeAvailability ¶
type ThreeDS1Parameters ¶
type TokenizationConfig ¶
type UpdateBookingPayload ¶
type UpdateBookingPayload struct { Username string Password string Body *UpdateBookingRequest }
UpdateBookingPayload is the payload type of the booking service update_booking method.
type UpdateBookingRequest ¶
type UpdateBookingRequest struct {
Booking *Booking
}
type UpdateBookingResponse ¶
type UpdateBookingResponse struct { Booking *Booking UserPaymentOption *UserPaymentOption BookingFailure *BookingFailure }
UpdateBookingResponse is the result type of the booking service update_booking method.