ffjson

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: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bed

type Bed struct {
	Type        *string `json:"type"`
	Description *string `json:"description"`
	Count       *int    `json:"count"`
	Shared      *bool   `json:"shared"`
}

func (*Bed) MarshalJSON

func (j *Bed) MarshalJSON() ([]byte, error)

MarshalJSON marshal bytes to json - template

func (*Bed) MarshalJSONBuf

func (j *Bed) MarshalJSONBuf(buf fflib.EncodingBuffer) error

MarshalJSONBuf marshal buff to json - template

func (*Bed) UnmarshalJSON

func (j *Bed) UnmarshalJSON(input []byte) error

UnmarshalJSON umarshall json - template of ffjson

func (*Bed) UnmarshalJSONFFLexer

func (j *Bed) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error

UnmarshalJSONFFLexer fast json unmarshall - template ffjson

type CancelPenalty

type CancelPenalty struct {
	HoursBefore int     `json:"hoursBefore"`
	PenaltyType string  `json:"penaltyType"`
	Currency    string  `json:"currency"`
	Value       float64 `json:"value"`
}

func (*CancelPenalty) MarshalJSON

func (j *CancelPenalty) MarshalJSON() ([]byte, error)

MarshalJSON marshal bytes to json - template

func (*CancelPenalty) MarshalJSONBuf

func (j *CancelPenalty) MarshalJSONBuf(buf fflib.EncodingBuffer) error

MarshalJSONBuf marshal buff to json - template

func (*CancelPenalty) UnmarshalJSON

func (j *CancelPenalty) UnmarshalJSON(input []byte) error

UnmarshalJSON umarshall json - template of ffjson

func (*CancelPenalty) UnmarshalJSONFFLexer

func (j *CancelPenalty) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error

UnmarshalJSONFFLexer fast json unmarshall - template ffjson

type CancelPolicy

type CancelPolicy struct {
	Refundable      bool            `json:"refundable"`
	CancelPenalties []CancelPenalty `json:"cancelPenalties"`
}

func (*CancelPolicy) MarshalJSON

func (j *CancelPolicy) MarshalJSON() ([]byte, error)

MarshalJSON marshal bytes to json - template

func (*CancelPolicy) MarshalJSONBuf

func (j *CancelPolicy) MarshalJSONBuf(buf fflib.EncodingBuffer) error

MarshalJSONBuf marshal buff to json - template

func (*CancelPolicy) UnmarshalJSON

func (j *CancelPolicy) UnmarshalJSON(input []byte) error

UnmarshalJSON umarshall json - template of ffjson

func (*CancelPolicy) UnmarshalJSONFFLexer

func (j *CancelPolicy) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error

UnmarshalJSONFFLexer fast json unmarshall - template ffjson

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 Exchange

type Exchange struct {
	Currency string  `json:"currency"`
	Rate     float64 `json:"rate"`
}

func (*Exchange) MarshalJSON

func (j *Exchange) MarshalJSON() ([]byte, error)

MarshalJSON marshal bytes to json - template

func (*Exchange) MarshalJSONBuf

func (j *Exchange) MarshalJSONBuf(buf fflib.EncodingBuffer) error

MarshalJSONBuf marshal buff to json - template

func (*Exchange) UnmarshalJSON

func (j *Exchange) UnmarshalJSON(input []byte) error

UnmarshalJSON umarshall json - template of ffjson

func (*Exchange) UnmarshalJSONFFLexer

func (j *Exchange) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error

UnmarshalJSONFFLexer fast json unmarshall - template ffjson

type Markup

type Markup struct {
	Channel  *string  `json:"channel"`
	Currency string   `json:"currency"`
	Binding  bool     `json:"binding"`
	Net      float64  `json:"net"`
	Gross    *float64 `json:"gross"`
	Exchange Exchange `json:"exchange"`
	Rules    []Rule   `json:"rules"`
}

func (*Markup) MarshalJSON

func (j *Markup) MarshalJSON() ([]byte, error)

MarshalJSON marshal bytes to json - template

func (*Markup) MarshalJSONBuf

func (j *Markup) MarshalJSONBuf(buf fflib.EncodingBuffer) error

MarshalJSONBuf marshal buff to json - template

func (*Markup) UnmarshalJSON

func (j *Markup) UnmarshalJSON(input []byte) error

UnmarshalJSON umarshall json - template of ffjson

func (*Markup) UnmarshalJSONFFLexer

func (j *Markup) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error

UnmarshalJSONFFLexer fast json unmarshall - template ffjson

type Occupancy

type Occupancy struct {
	Id    int   `json:"id"`
	Paxes []Pax `json:"paxes"`
}

func (*Occupancy) MarshalJSON

func (j *Occupancy) MarshalJSON() ([]byte, error)

MarshalJSON marshal bytes to json - template

func (*Occupancy) MarshalJSONBuf

func (j *Occupancy) MarshalJSONBuf(buf fflib.EncodingBuffer) error

MarshalJSONBuf marshal buff to json - template

func (*Occupancy) UnmarshalJSON

func (j *Occupancy) UnmarshalJSON(input []byte) error

UnmarshalJSON umarshall json - template of ffjson

func (*Occupancy) UnmarshalJSONFFLexer

func (j *Occupancy) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error

UnmarshalJSONFFLexer fast json unmarshall - template ffjson

type Option

type Option struct {
	SupplierCode      string        `json:"supplierCode"`
	AccessCode        string        `json:"accessCode"`
	Market            string        `json:"market"`
	HotelCode         string        `json:"hotelCode"`
	HotelCodeSupplier string        `json:"hotelCodeSupplier"`
	HotelName         *string       `json:"hotelName"`
	BoardCode         string        `json:"boardCode"`
	BoardCodeSupplier string        `json:"boardCodeSupplier"`
	PaymentType       string        `json:"paymentType"`
	Status            string        `json:"status"`
	Occupancies       []Occupancy   `json:"occupancies"`
	Rooms             []Room        `json:"rooms"`
	Price             Price         `json:"price"`
	Supplements       []Supplement  `json:"supplements"`
	Surcharges        []Surcharge   `json:"surcharges"`
	RateRules         []string      `json:"rateRules"`
	CancelPolicy      *CancelPolicy `json:"cancelPolicy"`
	Remarks           *string       `json:"remarks"`
	Token             string        `json:"token"`
	Id                string        `json:"id"`
}

func (*Option) MarshalJSON

func (j *Option) MarshalJSON() ([]byte, error)

MarshalJSON marshal bytes to json - template

func (*Option) MarshalJSONBuf

func (j *Option) MarshalJSONBuf(buf fflib.EncodingBuffer) error

MarshalJSONBuf marshal buff to json - template

func (*Option) UnmarshalJSON

func (j *Option) UnmarshalJSON(input []byte) error

UnmarshalJSON umarshall json - template of ffjson

func (*Option) UnmarshalJSONFFLexer

func (j *Option) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error

UnmarshalJSONFFLexer fast json unmarshall - template ffjson

type Pax

type Pax struct {
	Age int `json:"age"`
}

func (*Pax) MarshalJSON

func (j *Pax) MarshalJSON() ([]byte, error)

MarshalJSON marshal bytes to json - template

func (*Pax) MarshalJSONBuf

func (j *Pax) MarshalJSONBuf(buf fflib.EncodingBuffer) error

MarshalJSONBuf marshal buff to json - template

func (*Pax) UnmarshalJSON

func (j *Pax) UnmarshalJSON(input []byte) error

UnmarshalJSON umarshall json - template of ffjson

func (*Pax) UnmarshalJSONFFLexer

func (j *Pax) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error

UnmarshalJSONFFLexer fast json unmarshall - template ffjson

type Price

type Price struct {
	Currency string   `json:"currency"`
	Binding  bool     `json:"binding"`
	Net      float64  `json:"net"`
	Gross    *float64 `json:"gross"`
	Exchange Exchange `json:"exchange"`
	Markups  []Markup `json:"markups"`
}

func (*Price) MarshalJSON

func (j *Price) MarshalJSON() ([]byte, error)

MarshalJSON marshal bytes to json - template

func (*Price) MarshalJSONBuf

func (j *Price) MarshalJSONBuf(buf fflib.EncodingBuffer) error

MarshalJSONBuf marshal buff to json - template

func (*Price) UnmarshalJSON

func (j *Price) UnmarshalJSON(input []byte) error

UnmarshalJSON umarshall json - template of ffjson

func (*Price) UnmarshalJSONFFLexer

func (j *Price) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error

UnmarshalJSONFFLexer fast json unmarshall - template ffjson

type PriceBreakdown

type PriceBreakdown struct {
	EffectiveDate string `json:"effectiveDate"`
	ExpireDate    string `json:"expireDate"`
	Price         Price  `json:"price"`
}

func (*PriceBreakdown) MarshalJSON

func (j *PriceBreakdown) MarshalJSON() ([]byte, error)

MarshalJSON marshal bytes to json - template

func (*PriceBreakdown) MarshalJSONBuf

func (j *PriceBreakdown) MarshalJSONBuf(buf fflib.EncodingBuffer) error

MarshalJSONBuf marshal buff to json - template

func (*PriceBreakdown) UnmarshalJSON

func (j *PriceBreakdown) UnmarshalJSON(input []byte) error

UnmarshalJSON umarshall json - template of ffjson

func (*PriceBreakdown) UnmarshalJSONFFLexer

func (j *PriceBreakdown) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error

UnmarshalJSONFFLexer fast json unmarshall - template ffjson

type Promotion

type Promotion struct {
	Code          string  `json:"code"`
	Name          *string `json:"name"`
	EffectiveDate *string `json:"effectiveDate"`
	ExpireDate    *string `json:"expireDate"`
}

func (*Promotion) MarshalJSON

func (j *Promotion) MarshalJSON() ([]byte, error)

MarshalJSON marshal bytes to json - template

func (*Promotion) MarshalJSONBuf

func (j *Promotion) MarshalJSONBuf(buf fflib.EncodingBuffer) error

MarshalJSONBuf marshal buff to json - template

func (*Promotion) UnmarshalJSON

func (j *Promotion) UnmarshalJSON(input []byte) error

UnmarshalJSON umarshall json - template of ffjson

func (*Promotion) UnmarshalJSONFFLexer

func (j *Promotion) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error

UnmarshalJSONFFLexer fast json unmarshall - template ffjson

type RatePlan

type RatePlan struct {
	Code          string  `json:"code"`
	Name          *string `json:"name"`
	EffectiveDate *string `json:"effectiveDate"`
	ExpireDate    *string `json:"expireDate"`
}

func (*RatePlan) MarshalJSON

func (j *RatePlan) MarshalJSON() ([]byte, error)

MarshalJSON marshal bytes to json - template

func (*RatePlan) MarshalJSONBuf

func (j *RatePlan) MarshalJSONBuf(buf fflib.EncodingBuffer) error

MarshalJSONBuf marshal buff to json - template

func (*RatePlan) UnmarshalJSON

func (j *RatePlan) UnmarshalJSON(input []byte) error

UnmarshalJSON umarshall json - template of ffjson

func (*RatePlan) UnmarshalJSONFFLexer

func (j *RatePlan) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error

UnmarshalJSONFFLexer fast json unmarshall - template ffjson

type Resort

type Resort struct {
	Code        string  `json:"code"`
	Name        *string `json:"name"`
	Description *string `json:"description"`
}

func (*Resort) MarshalJSON

func (j *Resort) MarshalJSON() ([]byte, error)

MarshalJSON marshal bytes to json - template

func (*Resort) MarshalJSONBuf

func (j *Resort) MarshalJSONBuf(buf fflib.EncodingBuffer) error

MarshalJSONBuf marshal buff to json - template

func (*Resort) UnmarshalJSON

func (j *Resort) UnmarshalJSON(input []byte) error

UnmarshalJSON umarshall json - template of ffjson

func (*Resort) UnmarshalJSONFFLexer

func (j *Resort) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error

UnmarshalJSONFFLexer fast json unmarshall - template ffjson

type Response

type Response struct {
	Data struct {
		HotelX struct {
			Search struct {
				Options []Option `json:"options"`
				Errors  struct {
					Code        string `json:"code"`
					Type        string `json:"type"`
					Description string `json:"description"`
				} `json:"errors"`
			} `json:"search"`
		} `json:"hotelX"`
	} `json:"data"`
}

ffjson: skip

func NewResponse

func NewResponse(options []*presenter.Option) Response

type Room

type Room struct {
	OccupancyRefId int         `json:"occupancyRefId"`
	Code           string      `json:"code"`
	Description    *string     `json:"description"`
	Refundable     *bool       `json:"refundable"`
	Units          *int        `json:"units"`
	RoomPrice      RoomPrice   `json:"roomPrice"`
	Beds           []Bed       `json:"beds"`
	RatePlans      []RatePlan  `json:"ratePlans"`
	Promotions     []Promotion `json:"promotions"`
}

func (*Room) MarshalJSON

func (j *Room) MarshalJSON() ([]byte, error)

MarshalJSON marshal bytes to json - template

func (*Room) MarshalJSONBuf

func (j *Room) MarshalJSONBuf(buf fflib.EncodingBuffer) error

MarshalJSONBuf marshal buff to json - template

func (*Room) UnmarshalJSON

func (j *Room) UnmarshalJSON(input []byte) error

UnmarshalJSON umarshall json - template of ffjson

func (*Room) UnmarshalJSONFFLexer

func (j *Room) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error

UnmarshalJSONFFLexer fast json unmarshall - template ffjson

type RoomPrice

type RoomPrice struct {
	Price     Price            `json:"price"`
	Breakdown []PriceBreakdown `json:"breakdown"`
}

func (*RoomPrice) MarshalJSON

func (j *RoomPrice) MarshalJSON() ([]byte, error)

MarshalJSON marshal bytes to json - template

func (*RoomPrice) MarshalJSONBuf

func (j *RoomPrice) MarshalJSONBuf(buf fflib.EncodingBuffer) error

MarshalJSONBuf marshal buff to json - template

func (*RoomPrice) UnmarshalJSON

func (j *RoomPrice) UnmarshalJSON(input []byte) error

UnmarshalJSON umarshall json - template of ffjson

func (*RoomPrice) UnmarshalJSONFFLexer

func (j *RoomPrice) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error

UnmarshalJSONFFLexer fast json unmarshall - template ffjson

type Rule

type Rule struct {
	Id    string  `json:"id"`
	Name  *string `json:"name"`
	Type  string  `json:"type"`
	Value float64 `json:"value"`
}

func (*Rule) MarshalJSON

func (j *Rule) MarshalJSON() ([]byte, error)

MarshalJSON marshal bytes to json - template

func (*Rule) MarshalJSONBuf

func (j *Rule) MarshalJSONBuf(buf fflib.EncodingBuffer) error

MarshalJSONBuf marshal buff to json - template

func (*Rule) UnmarshalJSON

func (j *Rule) UnmarshalJSON(input []byte) error

UnmarshalJSON umarshall json - template of ffjson

func (*Rule) UnmarshalJSONFFLexer

func (j *Rule) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error

UnmarshalJSONFFLexer fast json unmarshall - template ffjson

type Supplement

type Supplement struct {
	Code           string  `json:"code"`
	Name           *string `json:"name"`
	Description    *string `json:"description"`
	SupplementType string  `json:"supplementType"`
	ChargeType     string  `json:"chargeType"`
	Mandatory      bool    `json:"mandatory"`
	DurationType   *string `json:"durationType"`
	Quantity       *int    `json:"quantity"`
	Unit           *string `json:"unit"`
	EffectiveDate  *string `json:"effectiveDate"`
	ExpireDate     *string `json:"expireDate"`
	Resort         *Resort `json:"resort"`
	Price          *Price  `json:"price"`
}

func (*Supplement) MarshalJSON

func (j *Supplement) MarshalJSON() ([]byte, error)

MarshalJSON marshal bytes to json - template

func (*Supplement) MarshalJSONBuf

func (j *Supplement) MarshalJSONBuf(buf fflib.EncodingBuffer) error

MarshalJSONBuf marshal buff to json - template

func (*Supplement) UnmarshalJSON

func (j *Supplement) UnmarshalJSON(input []byte) error

UnmarshalJSON umarshall json - template of ffjson

func (*Supplement) UnmarshalJSONFFLexer

func (j *Supplement) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error

UnmarshalJSONFFLexer fast json unmarshall - template ffjson

type Surcharge

type Surcharge struct {
	ChargeType  string  `json:"chargeType"`
	Mandatory   bool    `json:"mandatory"`
	Price       Price   `json:"price"`
	Description *string `json:"description"`
}

func (*Surcharge) MarshalJSON

func (j *Surcharge) MarshalJSON() ([]byte, error)

MarshalJSON marshal bytes to json - template

func (*Surcharge) MarshalJSONBuf

func (j *Surcharge) MarshalJSONBuf(buf fflib.EncodingBuffer) error

MarshalJSONBuf marshal buff to json - template

func (*Surcharge) UnmarshalJSON

func (j *Surcharge) UnmarshalJSON(input []byte) error

UnmarshalJSON umarshall json - template of ffjson

func (*Surcharge) UnmarshalJSONFFLexer

func (j *Surcharge) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error

UnmarshalJSONFFLexer fast json unmarshall - template ffjson

Jump to

Keyboard shortcuts

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