Documentation ¶
Index ¶
- Constants
- type Capsule
- type Client
- func (c *Client) GetAllCapsules() ([]*Capsule, error)
- func (c *Client) GetAllRockets() ([]*Rocket, error)
- func (c *Client) GetCapsule(name string) (*Capsule, error)
- func (c *Client) GetHistory(filters map[string]interface{}) ([]*History, error)
- func (c *Client) GetInfo() (*Info, error)
- func (c *Client) GetLatestLaunch() (*Launch, error)
- func (c *Client) GetLaunches(launchType LaunchType, filters map[string]interface{}) ([]*Launch, error)
- func (c *Client) GetNextLaunch() (*Launch, error)
- func (c *Client) GetObjectInfo(name string) (*ObjectInfo, error)
- func (c *Client) GetRocket(name string) (*Rocket, error)
- type History
- type Info
- type Launch
- type LaunchType
- type ObjectInfo
- type Rocket
Constants ¶
View Source
const ( LaunchTypePast = LaunchType(3) LaunchTypeUpcoming = LaunchType(4) LaunchTypeAll = LaunchType(5) )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Capsule ¶
type Capsule struct { ID string `json:"id"` Name string `json:"name"` Type string `json:"type"` Active bool `json:"active"` CrewCapacity float64 `json:"crew_capacity"` SidewallAngleDeg float64 `json:"sidewall_angle_deg"` OrbitDurationYr float64 `json:"orbit_duration_yr"` HeatShield struct { Material string `json:"material"` SizeMeters float64 `json:"size_meters"` TempDegrees float64 `json:"temp_degrees"` DevPartner string `json:"dev_partner"` } `json:"heat_shield"` Thrusters []struct { Type string `json:"type"` Amount float64 `json:"amount"` Pods float64 `json:"pods"` Fuel1 string `json:"fuel_1"` Fuel2 string `json:"fuel_2"` Thrust struct { KN float64 `json:"kN"` Lbf float64 `json:"lbf"` } `json:"thrust"` } `json:"thrusters"` LaunchPayloadMass struct { Kg float64 `json:"kg"` Lb float64 `json:"lb"` } `json:"launch_payload_mass"` LaunchPayloadVol struct { CubicMeters float64 `json:"cubic_meters"` CubicFeet float64 `json:"cubic_feet"` } `json:"launch_payload_vol"` ReturnPayloadMass struct { Kg float64 `json:"kg"` Lb float64 `json:"lb"` } `json:"return_payload_mass"` ReturnPayloadVol struct { CubicMeters float64 `json:"cubic_meters"` CubicFeet float64 `json:"cubic_feet"` } `json:"return_payload_vol"` PressurizedCapsule struct { PayloadVolume struct { CubicMeters float64 `json:"cubic_meters"` CubicFeet float64 `json:"cubic_feet"` } `json:"payload_volume"` } `json:"pressurized_capsule"` Trunk struct { TrunkVolume struct { CubicMeters float64 `json:"cubic_meters"` CubicFeet float64 `json:"cubic_feet"` } `json:"trunk_volume"` Cargo struct { SolarArray float64 `json:"solar_array"` UnpressurizedCargo bool `json:"unpressurized_cargo"` } `json:"cargo"` } `json:"trunk"` HeightWTrunk struct { Meters float64 `json:"meters"` Feet float64 `json:"feet"` } `json:"height_w_trunk"` Diameter struct { Meters float64 `json:"meters"` Feet float64 `json:"feet"` } `json:"diameter"` Wikipedia string `json:"wikipedia"` Description string `json:"description"` }
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewWithRateLimit ¶
func (*Client) GetAllCapsules ¶
GetAllCapsules returns all Capsules info
func (*Client) GetAllRockets ¶
GetAllRockets returns all rockets info
func (*Client) GetCapsule ¶
GetCapsule returns Capsule info by name
func (*Client) GetHistory ¶
GetHistory returns historical events according to filters
func (*Client) GetLatestLaunch ¶
GetLatestLaunch returns the latest launch
func (*Client) GetLaunches ¶
func (c *Client) GetLaunches(launchType LaunchType, filters map[string]interface{}) ([]*Launch, error)
GetLaunches returns launches according to launch type and filters
func (*Client) GetNextLaunch ¶
GetNextLaunch returns the next launch“
func (*Client) GetObjectInfo ¶
func (c *Client) GetObjectInfo(name string) (*ObjectInfo, error)
GetObjectInfo returns object info by name
type History ¶
type History struct { Title string `json:"title"` EventDateUtc time.Time `json:"event_date_utc"` EventDateUnix int `json:"event_date_unix"` FlightNumber int `json:"flight_number"` Details string `json:"details"` Links struct { Reddit string `json:"reddit"` Article string `json:"article"` Wikipedia string `json:"wikipedia"` } `json:"links"` }
type Info ¶
type Info struct { Name string `json:"name"` Founder string `json:"founder"` Founded int `json:"founded"` Employees int `json:"employees"` Vehicles int `json:"vehicles"` LaunchSites int `json:"launch_sites"` TestSites int `json:"test_sites"` Ceo string `json:"ceo"` Cto string `json:"cto"` Coo string `json:"coo"` CtoPropulsion string `json:"cto_propulsion"` Valuation int64 `json:"valuation"` Headquarters struct { Address string `json:"address"` City string `json:"city"` State string `json:"state"` } `json:"headquarters"` Summary string `json:"summary"` }
type Launch ¶
type Launch struct { FlightNumber float64 `json:"flight_number"` MissionName string `json:"mission_name"` LaunchYear string `json:"launch_year"` LaunchDateUnix float64 `json:"launch_date_unix"` LaunchDateUtc time.Time `json:"launch_date_utc"` LaunchDateLocal string `json:"launch_date_local"` Rocket struct { RocketID string `json:"rocket_id"` RocketName string `json:"rocket_name"` RocketType string `json:"rocket_type"` FirstStage struct { Cores []struct { CoreSerial string `json:"core_serial"` Flight float64 `json:"flight"` Block float64 `json:"block"` Reused bool `json:"reused"` LandSuccess bool `json:"land_success"` LandingType string `json:"landing_type"` LandingVehicle string `json:"landing_vehicle"` } `json:"cores"` } `json:"first_stage"` SecondStage struct { Block float64 `json:"block"` Payloads []struct { PayloadID string `json:"payload_id"` NoradID []float64 `json:"norad_id"` Reused bool `json:"reused"` Customers []string `json:"customers"` Nationality string `json:"nationality"` Manufacturer string `json:"manufacturer"` PayloadType string `json:"payload_type"` PayloadMassKg float64 `json:"payload_mass_kg"` PayloadMassLbs float64 `json:"payload_mass_lbs"` Orbit string `json:"orbit"` OrbitParams struct { ReferenceSystem string `json:"reference_system"` Regime string `json:"regime"` Longitude float64 `json:"longitude"` SemiMajorAxisKm float64 `json:"semi_major_axis_km"` Eccentricity float64 `json:"eccentricity"` PeriapsisKm float64 `json:"periapsis_km"` ApoapsisKm float64 `json:"apoapsis_km"` InclinationDeg float64 `json:"inclination_deg"` PeriodMin float64 `json:"period_min"` LifespanYears float64 `json:"lifespan_years"` Epoch time.Time `json:"epoch"` MeanMotion float64 `json:"mean_motion"` Raan float64 `json:"raan"` } `json:"orbit_params"` } `json:"payloads"` } `json:"second_stage"` } `json:"rocket"` Telemetry struct { FlightClub interface{} `json:"flight_club"` } `json:"telemetry"` Reuse struct { Core bool `json:"core"` SideCore1 bool `json:"side_core1"` SideCore2 bool `json:"side_core2"` Fairings bool `json:"fairings"` Capsule bool `json:"capsule"` } `json:"reuse"` LaunchSite struct { SiteID string `json:"site_id"` SiteName string `json:"site_name"` SiteNameLong string `json:"site_name_long"` } `json:"launch_site"` LaunchSuccess bool `json:"launch_success"` Links struct { MissionPatch string `json:"mission_patch"` MissionPatchSmall string `json:"mission_patch_small"` RedditCampaign string `json:"reddit_campaign"` RedditLaunch string `json:"reddit_launch"` RedditRecovery interface{} `json:"reddit_recovery"` RedditMedia string `json:"reddit_media"` Presskit string `json:"presskit"` ArticleLink string `json:"article_link"` Wikipedia string `json:"wikipedia"` VideoLink string `json:"video_link"` } `json:"links"` Details string `json:"details"` Upcoming bool `json:"upcoming"` StaticFireDateUtc time.Time `json:"static_fire_date_utc"` }
type LaunchType ¶
type LaunchType int
type ObjectInfo ¶
type ObjectInfo struct { Name string `json:"name"` LaunchDateUtc time.Time `json:"launch_date_utc"` LaunchDateUnix int `json:"launch_date_unix"` LaunchMassKg float64 `json:"launch_mass_kg"` LaunchMassLbs float64 `json:"launch_mass_lbs"` NoradID float64 `json:"norad_id"` EpochJd string `json:"epoch_jd"` OrbitType string `json:"orbit_type"` ApoapsisAu float64 `json:"apoapsis_au"` PeriapsisAu float64 `json:"periapsis_au"` SemiMajorAxisAu float64 `json:"semi_major_axis_au"` Eccentricity float64 `json:"eccentricity"` Inclination float64 `json:"inclination"` Longitude float64 `json:"longitude"` PeriapsisArg float64 `json:"periapsis_arg"` PeriodDays float64 `json:"period_days"` SpeedKph float64 `json:"speed_kph"` SpeedMph float64 `json:"speed_mph"` EarthDistanceKm float64 `json:"earth_distance_km"` EarthDistanceMi float64 `json:"earth_distance_mi"` MarsDistanceKm float64 `json:"mars_distance_km"` MarsDistanceMi float64 `json:"mars_distance_mi"` Wikipedia string `json:"wikipedia"` Details string `json:"details"` }
type Rocket ¶
type Rocket struct { Rocketid float64 `json:"rocketid"` ID string `json:"id"` Name string `json:"name"` Type string `json:"type"` Active bool `json:"active"` Stages float64 `json:"stages"` Boosters float64 `json:"boosters"` CostPerLaunch float64 `json:"cost_per_launch"` SuccessRatePct float64 `json:"success_rate_pct"` FirstFlight string `json:"first_flight"` Country string `json:"country"` Company string `json:"company"` Height struct { Meters float64 `json:"meters"` Feet float64 `json:"feet"` } `json:"height"` Diameter struct { Meters float64 `json:"meters"` Feet float64 `json:"feet"` } `json:"diameter"` Mass struct { Kg float64 `json:"kg"` Lb float64 `json:"lb"` } `json:"mass"` PayloadWeights []struct { ID string `json:"id"` Name string `json:"name"` Kg float64 `json:"kg"` Lb float64 `json:"lb"` } `json:"payload_weights"` FirstStage struct { Reusable bool `json:"reusable"` Engines float64 `json:"engines"` FuelAmountTons float64 `json:"fuel_amount_tons"` BurnTimeSec float64 `json:"burn_time_sec"` ThrustSeaLevel struct { KN float64 `json:"kN"` Lbf float64 `json:"lbf"` } `json:"thrust_sea_level"` ThrustVacuum struct { KN float64 `json:"kN"` Lbf float64 `json:"lbf"` } `json:"thrust_vacuum"` } `json:"first_stage"` SecondStage struct { Engines float64 `json:"engines"` FuelAmountTons float64 `json:"fuel_amount_tons"` BurnTimeSec float64 `json:"burn_time_sec"` Thrust struct { KN float64 `json:"kN"` Lbf float64 `json:"lbf"` } `json:"thrust"` Payloads struct { Option1 string `json:"option_1"` Option2 string `json:"option_2"` CompositeFairing struct { Height struct { Meters float64 `json:"meters"` Feet float64 `json:"feet"` } `json:"height"` Diameter struct { Meters float64 `json:"meters"` Feet float64 `json:"feet"` } `json:"diameter"` } `json:"composite_fairing"` } `json:"payloads"` } `json:"second_stage"` Engines struct { Number float64 `json:"number"` Type string `json:"type"` Version string `json:"version"` Layout string `json:"layout"` EngineLossMax float64 `json:"engine_loss_max"` Propellant1 string `json:"propellant_1"` Propellant2 string `json:"propellant_2"` ThrustSeaLevel struct { KN float64 `json:"kN"` Lbf float64 `json:"lbf"` } `json:"thrust_sea_level"` ThrustVacuum struct { KN float64 `json:"kN"` Lbf float64 `json:"lbf"` } `json:"thrust_vacuum"` ThrustToWeight float64 `json:"thrust_to_weight"` } `json:"engines"` LandingLegs struct { Number float64 `json:"number"` Material string `json:"material"` } `json:"landing_legs"` Wikipedia string `json:"wikipedia"` Description string `json:"description"` }
Click to show internal directories.
Click to hide internal directories.