info

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2024 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	API_KEY string = "cc0582fc84e09298349ff4b21dc76c5e"
)

Variables

View Source
var InfoCmd = &cobra.Command{
	Use:   "info",
	Short: "All about information",
	Long:  `This command provides information about the system.`,
	Run: func(cmd *cobra.Command, args []string) {
		cmd.Help()
	},
}
View Source
var (
	KB = uint64(1024)
)
View Source
var (
	Key string
)

Functions

This section is empty.

Types

type IPInfo

type IPInfo struct {
	IP       string `json:"ip"`
	City     string `json:"city"`
	Region   string `json:"region"`
	Country  string `json:"country"`
	Loc      string `json:"loc"`
	Org      string `json:"org"`
	Postal   string `json:"postal"`
	Timezone string `json:"timezone"`
	Readme   string `json:"readme"`
}

type Weather

type Weather struct {
	Timezone       string `json:"timezone"`
	TimezoneOffset int    `json:"timezone_offset"`
	Current        struct {
		Dt      int64   `json:"dt"`
		Temp    float64 `json:"temp"`
		Weather []struct {
			Main        string `json:"main"`
			Description string `json:"description"`
		} `json:"weather"`
	} `json:"current"`
	Hourly []struct {
		Temp    float64 `json:"temp"`
		Weather []struct {
			Main        string `json:"main"`
			Description string `json:"description"`
		} `json:"weather"`
	} `json:"hourly"`
	Daily []struct {
		Summary string `json:"summary"`
		Temp    struct {
			Day     float64 `json:"day"`
			Morning float64 `json:"morn"`
			Evening float64 `json:"eve"`
			Night   float64 `json:"night"`
		} `json:"temp"`
		Weather []struct {
			Main        string `json:"main"`
			Description string `json:"description"`
		} `json:"weather"`
	} `json:"daily"`
}

Jump to

Keyboard shortcuts

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