models

package
v0.0.0-...-b2d281f Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2020 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type Airport

type Airport struct {
	Name    string `json:"name"`
	Icao    string `json:"ICAO"`
	Iata    string `json:"IATA"`
	City    string `json:"city"`
	Country string `json:"country"`
}

type Currency

type Currency string
const (
	CurrencyUsd Currency = "USD"
	CurrencyEur Currency = "EUR"
	CurrencyGbp Currency = "GBP"
	CurrencyCad Currency = "CAD"
)

func (Currency) IsValid

func (e Currency) IsValid() bool

func (Currency) MarshalGQL

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

func (Currency) String

func (e Currency) String() string

func (*Currency) UnmarshalGQL

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

type Estimate

type Estimate struct {
	ID       string    `json:"id"`
	Price    *Price    `json:"price"`
	Provider *Provider `json:"provider"`
	Carbon   *int      `json:"carbon"`
	Km       *int      `json:"km"`
	Details  *string   `json:"details"`
}

type EstimateIn

type EstimateIn struct {
	ID      *string          `json:"id"`
	Carbon  *int             `json:"carbon"`
	Options *EstimateOptions `json:"options"`
}

type EstimateOptions

type EstimateOptions struct {
	Provider *Provider `json:"provider"`
}

type Flight

type Flight struct {
	Departure    *string `json:"departure"`
	Arrival      *string `json:"arrival"`
	FlightNumber *string `json:"flightNumber"`
	Date         *string `json:"date"`
}

type GetAirport

type GetAirport struct {
	Search   []*Airport `json:"search"`
	FromIcao *Airport   `json:"fromICAO"`
}

type GetEstimate

type GetEstimate struct {
	FromFlights *Estimate `json:"fromFlights"`
	FromID      *Estimate `json:"fromID"`
}

type Health

type Health struct {
	AliveSince  int    `json:"aliveSince"`
	Environment string `json:"environment"`
}

type PaymentActions

type PaymentActions struct {
	Checkout *PaymentResponse `json:"checkout"`
	Confirm  *PaymentResponse `json:"confirm"`
}

type PaymentOptions

type PaymentOptions struct {
	SaveCard   *bool   `json:"saveCard"`
	CustomerID *string `json:"customerID"`
}

type PaymentResponse

type PaymentResponse struct {
	Success                   *bool     `json:"success"`
	CustomerID                *string   `json:"customerID"`
	RequiresAction            *bool     `json:"requiresAction"`
	PaymentIntentClientSecret *string   `json:"paymentIntentClientSecret"`
	Purchase                  *Purchase `json:"purchase"`
}

type Price

type Price struct {
	Currency  Currency        `json:"currency"`
	Cents     int             `json:"cents"`
	Breakdown []*PriceElement `json:"breakdown"`
}

type PriceElement

type PriceElement struct {
	Name     string   `json:"name"`
	Cents    int      `json:"cents"`
	Currency Currency `json:"currency"`
}

type Provider

type Provider string
const (
	ProviderCloverly      Provider = "Cloverly"
	ProviderDigitalHumani Provider = "DigitalHumani"
)

func (Provider) IsValid

func (e Provider) IsValid() bool

func (Provider) MarshalGQL

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

func (Provider) String

func (e Provider) String() string

func (*Provider) UnmarshalGQL

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

type Purchase

type Purchase struct {
	ID      *string `json:"id"`
	Carbon  int     `json:"carbon"`
	Details *string `json:"details"`
}

Jump to

Keyboard shortcuts

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