client

package
v0.0.0-...-6e805fd Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 17, 2026 License: MIT Imports: 16 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	// BED AND BREAKFAST
	RoomBasisBedAndBreakfast = "BB"
	// BED AND BREAKFAST UP TO 2
	RoomBasisBedAndBreakfast2 = "BB2"
	// CONTINENTAL BREAKFAST
	RoomBasisContinentalBreakfast = "CB"
	// ALL-INCLUSIVE
	RoomBasisAllInclusive = "AI"
	// ALL INCLUSIVE SOFT
	RoomBasisAllInclusiveSoft = "AIS"
	// ULTRA ALL INCLUSIVE
	RoomBasisUltraAllInclusive = "UAI"
	// FULL-BOARD
	RoomBasisFullBoard = "FB"
	// HALF-BOARD
	RoomBasisHalfBoard = "HB"
	// ROOM ONLY
	RoomBasisRoomOnly = "RO"
	// BED AND DINNER
	RoomBasisBedAndDinner = "BD"
)
View Source
const (
	//Request for Booking was received - status not final, pending confirmation (C) or RJ
	OrderStatusRequested = "RQ"
	//Booking is finalized and active
	OrderStatusConfirmed = "C"
	//Cancellation Request was received - status not final, expect either X, C, VI or XP
	OrderStatusReqCancellation = "RX"
	//Booking canceled but has penalties
	OrderStatusCancelledWithPenaltyCharges = "XP"
	//Booking canceled FOC
	OrderStatusCancelled = "X"
	//Booking was rejected
	OrderStatusRejected = "RJ"
	//Booking is finalized, confirmed and the voucher was issued
	OrderStatusVoucherIssued = "VCH"
	//Booking is finalized, confirmed and request for voucher was issued
	OrderStatusVoucherReq = "VRQ"
)
View Source
const ResponseFormatJson = "JSON"
View Source
const SortOrderDefault = "Default"

Variables

This section is empty.

Functions

This section is empty.

Types

type Credentials

type Credentials struct {
	AgencyId int64
	UserName string
	Password string
}

type Destination

type Destination struct {
	CityId    int64  `csv:"CityId"`
	City      string `csv:"City"`
	CountryId int64  `csv:"CountryId"`
	Country   string `csv:"Country"`
	IsoCode   string `csv:"IsoCode"`
}

type GoGlobalService

type GoGlobalService interface {
	GetDestinations(context.Context, Credentials) ([]*Destination, error)
	GetHotels(context.Context, Credentials) ([]*Hotel, error)
	Search(context.Context, Credentials, models.HotelSearchRequest) ([]models.HotelSearchResponseItem, error)
	BookingValuation(context.Context, Credentials, models.BookValuationRequest) (models.BookValuationResponse, error)
	BookingInsert(context.Context, Credentials, models.BookingInsertRequest) (models.BookingInsertResponse, error)
	BookingStatus(context.Context, Credentials, models.BookingStatusRequest) (models.BookingStatusResponse, error)
	BookingSearch(context.Context, Credentials, models.BookingSearchRequest) (models.BookingSearchResponse, error)
	AdvBookingSearch(context.Context, Credentials, models.AdvBookingSearchRequest) (models.AdvBookingSearchResponse, error)
	BookingCancel(context.Context, Credentials, models.BookingCancelRequest) (models.BookingCancelResponse, error)
	VoucherDetails(context.Context, Credentials, models.VoucherDetailsRequest) (models.VoucherDetailsResponse, error)
	BookingInfoForAmendment(context.Context, Credentials, models.BookingInfoForAmendmentRequest) (models.BookingInfoForAmendmentResponse, error)
	BookingAmendment(context.Context, Credentials, models.BookingAmendmentRequest) error
	HotelInfo(context.Context, Credentials, models.HotelInfoRequest) (models.HotelInfoResponse, error)
	PriceBreakdown(context.Context, Credentials, models.PriceBreakdownRequest) (models.PriceBreakdownResponse, error)
}

func NewGoGlobalService

func NewGoGlobalService(
	apiUrl string,
	client HttpClient,
) GoGlobalService

type Hotel

type Hotel struct {
	CountryId   int64   `csv:"CountryId"`
	Country     string  `csv:"Country"`
	IsoCode     string  `csv:"IsoCode"`
	CityId      int64   `csv:"CityId"`
	City        string  `csv:"City"`
	HotelID     int64   `csv:"HotelID"`
	Name        string  `csv:"Name"`
	Address     string  `csv:"Address"`
	Phone       string  `csv:"Phone"`
	Fax         string  `csv:"Fax"`
	Stars       string  `csv:"Stars"`
	StarsID     int64   `csv:"StarsID"`
	Longitude   float64 `csv:"Longitude"`
	Latitude    float64 `csv:"Latitude"`
	IsApartment bool    `csv:"IsApartment"`
	GiataCode   string  `csv:"GiataCode"`
}

type HttpClient

type HttpClient interface {
	// Send sends an HTTP request and returns the response body, status code, and error
	Send(req *http.Request) ([]byte, int, error)
	// Do sends an HTTP request and returns the response
	Do(req *http.Request) (*http.Response, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL