cmd

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package cmd /*

Package cmd /*

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execute

func Execute()

Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.

Types

type ApiResponse

type ApiResponse struct {
	Message  string    `json:"message"`
	Stations []Station `json:"stations"`
}

type Aqi

type Aqi struct {
	City      string  `json:"city"`
	Place     string  `json:"placeName"`
	State     string  `json:"state"`
	UpdatedAt string  `json:"updatedAt"`
	AQI       float64 `json:"AQI"`
	AqiInfo   AqiInfo
}

type AqiInfo

type AqiInfo struct {
	Pollutant     string  `json:"pollutant"`
	Concentration float64 `json:"concentration"`
	Category      string  `json:"category"`
}

type Station

type Station struct {
	CO          float64 `json:"CO"`
	NO2         float64 `json:"NO2"`
	OZONE       float64 `json:"OZONE"`
	PM10        float64 `json:"PM10"`
	PM25        float64 `json:"PM25"`
	CountryCode string  `json:"countryCode"`
	Division    string  `json:"division"`
	Latitude    float64 `json:"lat"`
	Longitude   float64 `json:"lng"`
	PostalCode  string  `json:"postalCode"`
	City        string  `json:"city"`
	Place       string  `json:"placeName"`
	State       string  `json:"state"`
	UpdatedAt   string  `json:"updatedAt"`
	AQI         float64 `json:"AQI"`
	AqiInfo     AqiInfo
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳