package
0.0.0-20240628203544-b1838e96a1a0
Repository: https://github.com/alextopher/apod-bot.git
Documentation: pkg.go.dev
# Functions
IsValidDate checks if a date is formatted correctly and occurs after the first published APOD.
NewClient creates a new APOD client.
NewImageCache simplifies the creation of an APOD image cache.
NewImageWrapper creates a new ImageWrapper from binary data.
Retry is a helper function that reruns a function until it succeeds, at most 5 times.
# Variables
ErrorDateInvalid is returned when given date is not in the correct format.
ErrorDateNotFound is returned when given date is not found on the NASA API.
# Structs
APOD is a client for the NASA APOD API
It maintains a cache for APOD responses and an image cache for images.
ImageWrapper is a wrapper around an image.Image that caches the image's binary representation and format.
Response is a single JSON response from the APOD API.