cmd

package
v0.0.0-...-37cff07 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CacheFile  = "cache_file"
	RoverCache = "rover-cache"
)
View Source
const (
	NasaBaseUri = "https://api.nasa.gov/mars-photos/api/v1"
	ApiKey      = "DEMO_KEY"
)

Variables

View Source
var (
	Client = &http.Client{}
)

Functions

func Run

func Run() error

Types

type Camera

type Camera struct {
	ID       int64  `json:"id"`
	Name     string `json:"name"`
	RoverID  int64  `json:"rover_id"`
	FullName string `json:"full_name"`
}

type NasaResponse

type NasaResponse struct {
	Photos []Photo `json:"photos"`
}

type Photo

type Photo struct {
	ID        int64  `json:"id"`
	Sol       int64  `json:"sol"`
	Camera    Camera `json:"camera"`
	ImgSrc    string `json:"img_src"`
	EarthDate string `json:"earth_date"`
	Rover     Rover  `json:"rover"`
}

type Rover

type Rover struct {
	ID          int64  `json:"id"`
	Name        string `json:"name"`
	LandingDate string `json:"landing_date"`
	LaunchDate  string `json:"launch_date"`
	Status      string `json:"status"`
}

Jump to

Keyboard shortcuts

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