gqlgensm

package
v0.0.0-...-cc58ba3 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2019 License: GPL-3.0 Imports: 18 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AllServiceType = []ServiceType{
	ServiceTypeSkiPass,
}

Functions

func NewExecutableSchema

func NewExecutableSchema(cfg Config) graphql.ExecutableSchema

NewExecutableSchema creates an ExecutableSchema from the ResolverRoot interface.

Types

type AddOn

type AddOn struct {
	Key   string `json:"key"`
	Value string `json:"value"`
}

type AddOns

type AddOns struct {
	Distribute   *string `json:"distribute"`
	Distribution []AddOn `json:"distribution"`
}

type BookableOptionSearch

type BookableOptionSearch interface {
	IsBookableOptionSearch()
}

type Candidate

type Candidate struct{}

func (Candidate) HandlerFunc

func (Candidate) HandlerFunc(options []*presenter.Option) (http.HandlerFunc, error)

func (Candidate) UnmarshalOptions

func (Candidate) UnmarshalOptions(b []byte) ([]*presenter.Option, error)

type ComplexityRoot

type ComplexityRoot struct {
	AddOn struct {
		Key   func(childComplexity int) int
		Value func(childComplexity int) int
	}

	AddOns struct {
		Distribute   func(childComplexity int) int
		Distribution func(childComplexity int) int
	}

	AuditData struct {
		ProcessTime  func(childComplexity int) int
		TimeStamp    func(childComplexity int) int
		Transactions func(childComplexity int) int
	}

	Bed struct {
		Count       func(childComplexity int) int
		Description func(childComplexity int) int
		Shared      func(childComplexity int) int
		Type        func(childComplexity int) int
	}

	CancelPenalty struct {
		Currency    func(childComplexity int) int
		HoursBefore func(childComplexity int) int
		Type        func(childComplexity int) int
		Value       func(childComplexity int) int
	}

	CancelPolicy struct {
		CancelPenalties func(childComplexity int) int
		Refundable      func(childComplexity int) int
	}

	CriteriaSearch struct {
		CheckIn     func(childComplexity int) int
		CheckOut    func(childComplexity int) int
		Currency    func(childComplexity int) int
		Hotels      func(childComplexity int) int
		Language    func(childComplexity int) int
		Market      func(childComplexity int) int
		Nationality func(childComplexity int) int
		Occupancies func(childComplexity int) int
	}

	Error struct {
		Code        func(childComplexity int) int
		Description func(childComplexity int) int
		Type        func(childComplexity int) int
	}

	Exchange struct {
		Currency func(childComplexity int) int
		Rate     func(childComplexity int) int
	}

	HotelOptionSearch struct {
		Access            func(childComplexity int) int
		AddOns            func(childComplexity int) int
		BoardCode         func(childComplexity int) int
		BoardCodeOriginal func(childComplexity int) int
		CancelPolicy      func(childComplexity int) int
		HotelCode         func(childComplexity int) int
		HotelCodeSupplier func(childComplexity int) int
		HotelName         func(childComplexity int) int
		Market            func(childComplexity int) int
		Occupancies       func(childComplexity int) int
		OptionID          func(childComplexity int) int
		PaymentType       func(childComplexity int) int
		Price             func(childComplexity int) int
		RateRules         func(childComplexity int) int
		Remarks           func(childComplexity int) int
		Rooms             func(childComplexity int) int
		Status            func(childComplexity int) int
		Supplements       func(childComplexity int) int
		Supplier          func(childComplexity int) int
		Surcharges        func(childComplexity int) int
		Token             func(childComplexity int) int
	}

	HotelSearch struct {
		AuditData       func(childComplexity int) int
		Context         func(childComplexity int) int
		Errors          func(childComplexity int) int
		Options         func(childComplexity int) int
		RequestCriteria func(childComplexity int) int
		Stats           func(childComplexity int, token string) int
		Warnings        func(childComplexity int) int
	}

	HotelXQuery struct {
		Search              func(childComplexity int) int
		SearchStatusService func(childComplexity int) int
	}

	Markup struct {
		Binding  func(childComplexity int) int
		Channel  func(childComplexity int) int
		Currency func(childComplexity int) int
		Exchange func(childComplexity int) int
		Gross    func(childComplexity int) int
		Net      func(childComplexity int) int
		Rules    func(childComplexity int) int
	}

	Occupancy struct {
		Id    func(childComplexity int) int
		Paxes func(childComplexity int) int
	}

	Pax struct {
		Age func(childComplexity int) int
	}

	Price struct {
		Binding  func(childComplexity int) int
		Currency func(childComplexity int) int
		Exchange func(childComplexity int) int
		Gross    func(childComplexity int) int
		Markups  func(childComplexity int) int
		Net      func(childComplexity int) int
	}

	PriceBreakdown struct {
		EffectiveDate func(childComplexity int) int
		ExpireDate    func(childComplexity int) int
		Price         func(childComplexity int) int
	}

	Promotion struct {
		Code          func(childComplexity int) int
		EffectiveDate func(childComplexity int) int
		ExpireDate    func(childComplexity int) int
		Name          func(childComplexity int) int
	}

	Query struct {
		HotelX func(childComplexity int) int
	}

	RatePlan struct {
		Code          func(childComplexity int) int
		EffectiveDate func(childComplexity int) int
		ExpireDate    func(childComplexity int) int
		Name          func(childComplexity int) int
	}

	Resort struct {
		Code        func(childComplexity int) int
		Description func(childComplexity int) int
		Name        func(childComplexity int) int
	}

	Room struct {
		Beds           func(childComplexity int) int
		Code           func(childComplexity int) int
		Description    func(childComplexity int) int
		OccupancyRefID func(childComplexity int) int
		Promotions     func(childComplexity int) int
		RatePlans      func(childComplexity int) int
		Refundable     func(childComplexity int) int
		RoomPrice      func(childComplexity int) int
		Units          func(childComplexity int) int
	}

	RoomCriteria struct {
		Paxes func(childComplexity int) int
	}

	RoomPrice struct {
		Breakdown func(childComplexity int) int
		Price     func(childComplexity int) int
	}

	Rule struct {
		Id    func(childComplexity int) int
		Name  func(childComplexity int) int
		Type  func(childComplexity int) int
		Value func(childComplexity int) int
	}

	Search struct {
		Hotel func(childComplexity int, token *string, criteria *HotelCriteriaSearchInput, settings *domainHotelCommon.Settings, filter *search.Filter) int
	}

	ServiceStatus struct {
		Code        func(childComplexity int) int
		Description func(childComplexity int) int
		Type        func(childComplexity int) int
	}

	Stat struct {
		Duration func(childComplexity int) int
		End      func(childComplexity int) int
		Start    func(childComplexity int) int
	}

	StatAccess struct {
		Cities              func(childComplexity int) int
		Hotels              func(childComplexity int) int
		Name                func(childComplexity int) int
		Plugins             func(childComplexity int) int
		RequestAccess       func(childComplexity int) int
		ResponseAccess      func(childComplexity int) int
		StaticConfiguration func(childComplexity int) int
		Total               func(childComplexity int) int
		Transactions        func(childComplexity int) int
		Zones               func(childComplexity int) int
	}

	StatPlugin struct {
		Name  func(childComplexity int) int
		Total func(childComplexity int) int
	}

	StatTransaction struct {
		BuildRequest        func(childComplexity int) int
		ParseResponse       func(childComplexity int) int
		Reference           func(childComplexity int) int
		Total               func(childComplexity int) int
		WorkerCommunication func(childComplexity int) int
	}

	StatsRequest struct {
		Accesses       func(childComplexity int) int
		Cities         func(childComplexity int) int
		Configuration  func(childComplexity int) int
		DockerID       func(childComplexity int) int
		Hotels         func(childComplexity int) int
		Process        func(childComplexity int) int
		Request        func(childComplexity int) int
		RequestPlugin  func(childComplexity int) int
		Response       func(childComplexity int) int
		ResponsePlugin func(childComplexity int) int
		Total          func(childComplexity int) int
		Validation     func(childComplexity int) int
		Zones          func(childComplexity int) int
	}

	Supplement struct {
		ChargeType     func(childComplexity int) int
		Code           func(childComplexity int) int
		Description    func(childComplexity int) int
		DurationType   func(childComplexity int) int
		EffectiveDate  func(childComplexity int) int
		ExpireDate     func(childComplexity int) int
		Mandatory      func(childComplexity int) int
		Name           func(childComplexity int) int
		Price          func(childComplexity int) int
		Quantity       func(childComplexity int) int
		Resort         func(childComplexity int) int
		SupplementType func(childComplexity int) int
		Unit           func(childComplexity int) int
	}

	Surcharge struct {
		ChargeType  func(childComplexity int) int
		Description func(childComplexity int) int
		Mandatory   func(childComplexity int) int
		Price       func(childComplexity int) int
	}

	Transactions struct {
		Request   func(childComplexity int) int
		Response  func(childComplexity int) int
		TimeStamp func(childComplexity int) int
	}

	Warning struct {
		Code        func(childComplexity int) int
		Description func(childComplexity int) int
		Type        func(childComplexity int) int
	}
}

type Config

type Config struct {
	Resolvers  ResolverRoot
	Directives DirectiveRoot
	Complexity ComplexityRoot
}

type CriteriaSearch

type CriteriaSearch struct {
	CheckIn     string         `json:"checkIn"`
	CheckOut    string         `json:"checkOut"`
	Hotels      []string       `json:"hotels"`
	Occupancies []RoomCriteria `json:"occupancies"`
	Language    *string        `json:"language"`
	Currency    *string        `json:"currency"`
	Nationality *string        `json:"nationality"`
	Market      string         `json:"market"`
}

type DirectiveRoot

type DirectiveRoot struct {
}

type HotelCriteriaSearchInput

type HotelCriteriaSearchInput struct {
	CheckIn      string                        `json:"checkIn"`
	CheckOut     string                        `json:"checkOut"`
	Hotels       []string                      `json:"hotels"`
	Destinations []string                      `json:"destinations"`
	Occupancies  []domainHotelCommon.Occupancy `json:"occupancies"`
	Language     *string                       `json:"language"`
	Currency     *string                       `json:"currency"`
	Nationality  *string                       `json:"nationality"`
	Market       *string                       `json:"market"`
}

type HotelOptionSearchResolver

type HotelOptionSearchResolver interface {
	RateRules(ctx context.Context, obj *domainHotelCommon.Option) ([]RateRulesType, error)

	AddOns(ctx context.Context, obj *domainHotelCommon.Option) (*AddOns, error)
}

type HotelSearch

type HotelSearch struct {
	Context         *string                     `json:"context"`
	Stats           *StatsRequest               `json:"stats"`
	AuditData       *common.AuditData           `json:"auditData"`
	RequestCriteria *CriteriaSearch             `json:"requestCriteria"`
	Options         []*domainHotelCommon.Option `json:"options"`
	Errors          []common.AdviseMessage      `json:"errors"`
	Warnings        []common.AdviseMessage      `json:"warnings"`
}

func (HotelSearch) IsResponse

func (HotelSearch) IsResponse()

type HotelXQuery

type HotelXQuery struct {
	Search              *HotelSearch  `json:"search"`
	SearchStatusService ServiceStatus `json:"searchStatusService"`
}

type PluginType

type PluginType string
const (
	PluginTypePreStep            PluginType = "PRE_STEP"
	PluginTypeHotelMap           PluginType = "HOTEL_MAP"
	PluginTypeBoardMap           PluginType = "BOARD_MAP"
	PluginTypeRoomMap            PluginType = "ROOM_MAP"
	PluginTypeCurrencyConversion PluginType = "CURRENCY_CONVERSION"
	PluginTypeMarkup             PluginType = "MARKUP"
	PluginTypeAggregation        PluginType = "AGGREGATION"
	PluginTypePostStep           PluginType = "POST_STEP"
)

func (PluginType) IsValid

func (e PluginType) IsValid() bool

func (PluginType) MarshalGQL

func (e PluginType) MarshalGQL(w io.Writer)

func (PluginType) String

func (e PluginType) String() string

func (*PluginType) UnmarshalGQL

func (e *PluginType) UnmarshalGQL(v interface{}) error

type PriceType

type PriceType string
const (
	PriceTypeGross  PriceType = "GROSS"
	PriceTypeNet    PriceType = "NET"
	PriceTypeAmount PriceType = "AMOUNT"
)

func (PriceType) IsValid

func (e PriceType) IsValid() bool

func (PriceType) MarshalGQL

func (e PriceType) MarshalGQL(w io.Writer)

func (PriceType) String

func (e PriceType) String() string

func (*PriceType) UnmarshalGQL

func (e *PriceType) UnmarshalGQL(v interface{}) error

type Priceable

type Priceable interface {
	IsPriceable()
}

type QueryResolver

type QueryResolver interface {
	HotelX(ctx context.Context) (*HotelXQuery, error)
}

type RateRulesType

type RateRulesType string
const (
	RateRulesTypePackage          RateRulesType = "PACKAGE"
	RateRulesTypeOlder55          RateRulesType = "OLDER55"
	RateRulesTypeOlder60          RateRulesType = "OLDER60"
	RateRulesTypeOlder65          RateRulesType = "OLDER65"
	RateRulesTypeCanaryResident   RateRulesType = "CANARY_RESIDENT"
	RateRulesTypeBalearicResident RateRulesType = "BALEARIC_RESIDENT"
	RateRulesTypeLargeFamily      RateRulesType = "LARGE_FAMILY"
	RateRulesTypeHoneymoon        RateRulesType = "HONEYMOON"
	RateRulesTypePublicServant    RateRulesType = "PUBLIC_SERVANT"
	RateRulesTypeUnemployed       RateRulesType = "UNEMPLOYED"
	RateRulesTypeNormal           RateRulesType = "NORMAL"
	RateRulesTypeNonRefundable    RateRulesType = "NON_REFUNDABLE"
)

func (RateRulesType) IsValid

func (e RateRulesType) IsValid() bool

func (RateRulesType) MarshalGQL

func (e RateRulesType) MarshalGQL(w io.Writer)

func (RateRulesType) String

func (e RateRulesType) String() string

func (*RateRulesType) UnmarshalGQL

func (e *RateRulesType) UnmarshalGQL(v interface{}) error

type Resolver

type Resolver struct {
	Options []*domainHotelCommon.Option
}

func (*Resolver) HotelOptionSearch

func (r *Resolver) HotelOptionSearch() HotelOptionSearchResolver

func (*Resolver) Query

func (r *Resolver) Query() QueryResolver

type ResolverRoot

type ResolverRoot interface {
	HotelOptionSearch() HotelOptionSearchResolver
	Query() QueryResolver
}

type Response

type Response interface {
	IsResponse()
}

type RoomCriteria

type RoomCriteria struct {
	Paxes []domainHotelCommon.Pax `json:"paxes"`
}
type Search struct {
	Hotel *HotelSearch `json:"hotel"`
}

type ServiceStatus

type ServiceStatus struct {
	Code        *string `json:"code"`
	Type        *string `json:"type"`
	Description *string `json:"description"`
}

type ServiceType

type ServiceType string
const (
	ServiceTypeSkiPass ServiceType = "SKI_PASS"
)

func (ServiceType) IsValid

func (e ServiceType) IsValid() bool

func (ServiceType) MarshalGQL

func (e ServiceType) MarshalGQL(w io.Writer)

func (ServiceType) String

func (e ServiceType) String() string

func (*ServiceType) UnmarshalGQL

func (e *ServiceType) UnmarshalGQL(v interface{}) error

type Stat

type Stat struct {
	Start    string   `json:"start"`
	End      string   `json:"end"`
	Duration *float64 `json:"duration"`
}

type StatAccess

type StatAccess struct {
	Name                string            `json:"name"`
	Total               Stat              `json:"total"`
	StaticConfiguration *Stat             `json:"staticConfiguration"`
	Hotels              int               `json:"hotels"`
	Zones               int               `json:"zones"`
	Cities              int               `json:"cities"`
	RequestAccess       *StatPlugin       `json:"requestAccess"`
	ResponseAccess      *StatPlugin       `json:"responseAccess"`
	Transactions        []StatTransaction `json:"transactions"`
	Plugins             []StatPlugin      `json:"plugins"`
}

type StatPlugin

type StatPlugin struct {
	Name  string `json:"name"`
	Total Stat   `json:"total"`
}

type StatTransaction

type StatTransaction struct {
	Reference           string `json:"reference"`
	Total               Stat   `json:"total"`
	BuildRequest        Stat   `json:"buildRequest"`
	WorkerCommunication Stat   `json:"workerCommunication"`
	ParseResponse       Stat   `json:"parseResponse"`
}

type StatsRequest

type StatsRequest struct {
	Total          Stat         `json:"total"`
	Validation     Stat         `json:"validation"`
	Process        Stat         `json:"process"`
	Configuration  Stat         `json:"configuration"`
	Request        Stat         `json:"request"`
	Response       Stat         `json:"response"`
	RequestPlugin  *StatPlugin  `json:"requestPlugin"`
	ResponsePlugin *StatPlugin  `json:"responsePlugin"`
	Hotels         int          `json:"hotels"`
	Zones          int          `json:"zones"`
	Cities         int          `json:"cities"`
	DockerID       string       `json:"dockerID"`
	Accesses       []StatAccess `json:"Accesses"`
}

Jump to

Keyboard shortcuts

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